Avatar
Avatar
Iceman
@swift-6.0.3 import Foundation let format = Date.ISO8601FormatStyle.iso8601 .year() .month() .day() .time(includingFractionalSeconds: false) print(try Date("1992-08-22T00:00:00", strategy: format)) print(try Date("1992-08-22T00:00:00.123456", strategy: format)) print(try Date("1992-08-22T00:00:00ああああ", strategy: format)) (edited)
1992-08-22 00:00:00 +0000 1992-08-22 00:00:00 +0000 1992-08-22 00:00:00 +0000 (edited)