Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get next 10 days from current date in swift

I have dateformat string like this "2015-03-09".How do i get next 10 days date from current date?any help will be appreciated.thanks in advance

like image 713
user3823935 Avatar asked Mar 05 '15 10:03

user3823935


1 Answers

For a purely Swift 3 solution:

Calendar.current.date(byAdding: .day, value: 10, to: Date())
like image 161
vtcajones Avatar answered Sep 27 '22 19:09

vtcajones