Skip to content
New issue

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

Editorial: Add missing check in ParseTemporalInstant. #2084

Merged
merged 1 commit into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions polyfill/test/instant.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ describe('Instant', () => {
throws(() => Instant.from('+275760-09-13T00:00:00.000000001Z'), RangeError);
equal(`${Instant.from('-271821-04-20T00:00Z')}`, '-271821-04-20T00:00:00Z');
equal(`${Instant.from('+275760-09-13T00:00Z')}`, '+275760-09-13T00:00:00Z');
throws(() => Instant.from('-271821-04-20T00:00:00+00:01'), RangeError);
throws(() => Instant.from('+275760-09-13T00:00:00-00:01'), RangeError);
});
it('converting from DateTime', () => {
const min = Temporal.PlainDateTime.from('-271821-04-19T00:00:00.000000001');
Expand Down
5 changes: 4 additions & 1 deletion spec/instant.html
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,10 @@ <h1>ParseTemporalInstant ( _isoString_ )</h1>
1. If _utc_ &lt; −8.64 × 10<sup>21</sup> or _utc_ &gt; 8.64 × 10<sup>21</sup>, then
1. Throw a *RangeError* exception.
1. Let _offsetNanoseconds_ be ? ParseTimeZoneOffsetString(_offsetString_).
1. Return _utc_ − _offsetNanoseconds_.
1. Let _result_ be _utc_ − _offsetNanoseconds_.
1. If ! IsValidEpochNanoseconds(ℤ(_result_)) is *false*, then
1. Throw a *RangeError* exception.
1. Return _result_.
</emu-alg>
</emu-clause>

Expand Down