How to get next 10 days from current date in swift

user3823935 picture user3823935 · Mar 5, 2015 · Viewed 22.2k times · Source

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

Answer

vtcajones picture vtcajones · Aug 3, 2017

For a purely Swift 3 solution:

Calendar.current.date(byAdding: .day, value: 10, to: Date())