Skip to content

Temporal: Add tests for duration rounding edge case near +24h UTC shift#5044

Draft
ptomato wants to merge 1 commit into
tc39:mainfrom
ptomato:temporal-3310
Draft

Temporal: Add tests for duration rounding edge case near +24h UTC shift#5044
ptomato wants to merge 1 commit into
tc39:mainfrom
ptomato:temporal-3310

Conversation

@ptomato
Copy link
Copy Markdown
Contributor

@ptomato ptomato commented May 6, 2026

This edge case was discovered thanks to Firefox fuzzing: https://bugzilla.mozilla.org/show_bug.cgi?id=2029455

See tc39/proposal-temporal#3310

LLM disclosure: I used a bot to make a first draft of these, then hand-edited them until I was satisfied.

@ptomato ptomato requested a review from a team as a code owner May 6, 2026 20:09
@ptomato ptomato marked this pull request as draft May 6, 2026 20:09
@ptomato
Copy link
Copy Markdown
Contributor Author

ptomato commented May 6, 2026

Don't merge this yet. These tests currently hit an assertion failure in the spec. We need to decide what to do with it.

This edge case was discovered thanks to Firefox fuzzing:
https://bugzilla.mozilla.org/show_bug.cgi?id=2029455

There are two different tests, one for the bounding window being
collapsed by the +24h shift when rounding calendar units, and one for
being unable to find the day boundaries when rounding time units. The
latter does not apply to total() since it doesn't go through
NudgeToZonedTime.

See tc39/proposal-temporal#3310

LLM disclosure: I used a bot to make a first draft of these, then
hand-edited them until I was satisfied.
@ptomato
Copy link
Copy Markdown
Contributor Author

ptomato commented May 15, 2026

Just updated this with more test cases.

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.

1 participant