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

Temporal: Test new limits for getOffsetNanosecondsFor #3669

Merged
merged 3 commits into from
Sep 16, 2022

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Sep 16, 2022

This implements the normative change from tc39/proposal-temporal#2260 which achieved consensus in the July 2022 TC39 meeting. The PR is mostly subtracting 1 from a number of nanoseconds 😛 but there are two other commits that bring some similar tests more in line with each other.

In order for some tests to ensure that they are testing the right
exception, we need to make sure we are in the path where there are no
possible instants for a particular date-time. Override this method in some
tests.
This adds tests that validate a user-callable getOffsetNanosecondsFor to
several APIs that didn't test this yet: ZonedDateTime.since/until, and
Calendar.era/eraYear.
…ndsFor

This tests the normative change from
tc39/proposal-temporal#2260
which achieved consensus in the July 2022 TC39 meeting.

The return value from a userland getOffsetNanosecondsFor method is no
longer allowed to be exactly one 24-hour day.
@Ms2ger Ms2ger merged commit 58a9cdc into tc39:main Sep 16, 2022
@ptomato ptomato deleted the temporal-2260 branch September 16, 2022 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants