Home > AI > IOS > Foundation >

DateFormater

Example 1:

let today = Date()
let formatter1 = DateFormatter()
formatter1.dateStyle = .short
print(formatter1.string(from: today))

Leave a Reply