-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes in ParseTemporalDurationString
There were two problems in ParseTemporalDurationString: 1) The previous code didn't make any difference between absent duration string components and components that were present but 0. This led to strings like 'PT1.5H0M' being accepted, which should have been rejected according to the spec. 2) It was possible to incur rounding error in the nanoseconds when parsing fractional components. Instead, express all fractional components as a whole number of nanoseconds, which is possible to do without rounding error, and calculate nanoseconds, microseconds, milliseconds, excess seconds, and excess minutes resulting from fractional components at the end. Inlines DurationHandleFractions into ParseTemporalDurationString; this operation was already inlined in the spec text anyway. UPSTREAM_COMMIT=0bf0b5b4b1b50a1cf2d8e2447f88f2cb6c360b36
- Loading branch information
Showing
3 changed files
with
36 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters