-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: Simplify date/time range validation
This commit refactors several operations related to range validation of Temporal.PlainDateTime and Temporal.Instant. * Makes polyfill GetUTCEpochNanoseconds infallible, like in the spec. * Simplifies the polyfill's GetNamedTimeZoneOffsetNanoseconds by using the now-infallible GetUTCEpochNanoseconds. * Adds a new AO GetEpochNanoseconds to DRY date/time/offset=>nanoseconds calculations, and changes some call sites of GetUTCEpochNanoseconds to use this new AO instead. * Simplifies the polyfill's PlainDateTime range validation in RejectDateTimeRange. * Clarifies the PlainDateTime docs about that type's valid range. * Simplifies Instant parsing by using the new GetEpochNanoseconds AO. * Splits parsing from logic when parsing Instant strings. * Marks ParseDateTimeUTCOffset as infallible in ParseTemporalInstant. Fixes #2637. * Aligns polyfill to spec for Instant parsing.
- Loading branch information
1 parent
c4f9cf7
commit ac60dfc
Showing
7 changed files
with
139 additions
and
113 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
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
Oops, something went wrong.