You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SR-11049] DateFormatter rounds sub-milliseconds instead of truncating them. This is different from the behavior described in the document, "The format string uses the format pattern from Unicode Technical Standard # 35."
#3298
Open
norio-nomura opened this issue
Jun 30, 2019
· 0 comments
--
Dircted nanosecond: 999499976
Actual nanosecond : 999499917
Date: 2019-06-30T03:31:35Z
Date with fractional second: 2019-06-30T03:31:35.9990Z
--
Dircted nanosecond: 999499977
Actual nanosecond : 999500036
Date: 2019-06-30T03:31:36Z
Date with fractional second: 2019-06-30T03:31:36.0000Z
Either the documentation or the behavior should be fixed.
The text was updated successfully, but these errors were encountered:
Environment
Xcode 10.2.1
Xcode 11.0 beta 2
swift-5.0.1-RELEASE
swift-5.1-DEVELOPMENT-SNAPSHOT-2019-06-28-a
Additional Detail from JIRA
md5: 6647d2d7822108a7297fa558fb435b2e
Issue Description:
[The Date Formatting Guide|http://example.com|https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW13] said:
In the Date Field Symbol Table, UTS #35: Unicode LDML: Dates
But
DateFormatter
(both of darwin and linux) produces result with rounding sub-milliseconds instead of truncating:results:
Either the documentation or the behavior should be fixed.
The text was updated successfully, but these errors were encountered: