test262
test262 copied to clipboard
Temporal: Tests for correct intermediate value in ZonedDateTime difference/rounding
These test cases ensure that DST disambiguation does not take place on intermediate values that are not the start or the end of the calculation.
Note that NormalizedTimeDurationToDays is no longer called inside Temporal.Duration.prototype.add/subtract, so a few tests can be deleted.
Other tests need to be adjusted because NormalizedTimeDurationToDays is no longer called inside Temporal.ZonedDateTime.prototype.since/until via DifferenceZonedDateTime, although it is still called as part of rounding.
In addition, new tests for the now-fixed edge case are added.
See https://github.com/tc39/proposal-temporal/pull/2760, a normative change approved in the TC39 plenary of 2024-02.