We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xcode Version 11.5 (11E608c)
md5: 518c44c95703fc867fc7955333957c79
relates to:
Issue Description:
The ISO8601 standard RFC 3339 states that all of these:
1985-04-12T23:20:50.52Z 1996-12-19T16:39:57-08:00 //does work 1996-12-20T00:39:57Z //does work 1990-12-31T23:59:60Z 1937-01-01T12:00:27.87+00:20
are valid dates. However, the `ISO8601DateFormatter` doesn't decode all these. It decodes the ones with the "//does work".
Also, the `JSONDecoder` class with `dateDecodingStrategy` of `.iso8601` fails in the same way.
You can reproduce with this in a playground:
import Foundation let formatter = ISO8601DateFormatter() let dates = [ "1985-04-12T23:20:50.52Z", "1996-12-19T16:39:57-08:00", //works "1996-12-20T00:39:57Z", // works. "1990-12-31T23:59:60Z", "1990-12-31T15:59:60-08:00", "1937-01-01T12:00:27.87+00:20" ] let result: [Date?] = dates.map { return formatter.date(from: $0) } print(result)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Xcode Version 11.5 (11E608c)
Additional Detail from JIRA
md5: 518c44c95703fc867fc7955333957c79
relates to:
Issue Description:
The ISO8601 standard RFC 3339 states that all of these:
are valid dates. However, the `ISO8601DateFormatter` doesn't decode all these. It decodes the ones with the "//does work".
Also, the `JSONDecoder` class with `dateDecodingStrategy` of `.iso8601` fails in the same way.
You can reproduce with this in a playground:
The text was updated successfully, but these errors were encountered: