0

I have a task for working with dates. The meaning of a task is to create a date in ISO format. I can do this:

var date = Date()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"
formatter.timeZone = TimeZone.current
formatter.locale = Locale(identifier: "ru_RU")

Well, the result of function is 2018-02-25T15:51:51+03:00

How can I output the beginning of a next day in this format?

I tried to deal with dataComponents but I failed. I am a beginner in Swift 4 development and I need your help, please.

0 Answers0