Skip to content

Temporal: Test Duration.prototype.{round,total} with zoned property bags -> out-of-epoch-range - #5107

Open
MidnightDesign wants to merge 1 commit into
tc39:mainfrom
MidnightDesign:temporal-duration-relativeto-propertybag-range
Open

Temporal: Test Duration.prototype.{round,total} with zoned property bags -> out-of-epoch-range#5107
MidnightDesign wants to merge 1 commit into
tc39:mainfrom
MidnightDesign:temporal-duration-relativeto-propertybag-range

Conversation

@MidnightDesign

@MidnightDesign MidnightDesign commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

While working on increasing coverage of my PHP port of Temporal, my agent (Claude Code) encountered a gap in this test suite: calling round or total on out-of-epoch-range Durations is never tested with zoned property bags. This adds those tests. The tests were AI-generated.

V8 passes both new tests.

…ration round/total

A relativeTo property bag with a time zone yields a [[ZonedRelativeTo]]
just as a Temporal.ZonedDateTime or a zoned ISO string does, so the epoch
limits apply to it identically. The existing large-time-component tests
cover the ZonedDateTime and PlainDate spellings only, and the property bag
spelling was uncovered when rounding to a time unit.

Verified against V8 (node --harmony-temporal), which passes both tests.
Found via a JS-independent implementation that returned a result instead
of throwing for these inputs.

LLM disclosure: these were drafted with an LLM, then checked against the
spec text for GetTemporalRelativeToOption, the test262 linter, and V8.
@MidnightDesign
MidnightDesign requested a review from a team as a code owner August 17, 2026 10:32
@MidnightDesign MidnightDesign changed the title Test Duration.prototype.{round,total} with zoned property bags -> out-of-epoch-range Temporal: Test Duration.prototype.{round,total} with zoned property bags -> out-of-epoch-range Aug 17, 2026
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