Skip to content

Conversation

@ptomato
Copy link
Contributor

@ptomato ptomato commented Jan 22, 2026

TC39 adopted a normative change (tc39/proposal-temporal#3253) which disallows adding/subtracting units smaller than months to a Temporal.PlainYearMonth, and at the same time fixes a bug when subtracting with { overflow: 'reject' }. This PR adds tests ensuring that the removed functionality is no longer present, as well as some Intl Era/Month Code tests that were previously not committed because they'd have been affected by the bug.

See: tc39/proposal-temporal#3253

Durations with units lower than months are no longer allowed. (The lower
units may be present but 0.) Adjust the existing PlainYearMonth addition
tests to test this behaviour and delete tests that are now irrelevant.

Normative change: tc39/proposal-temporal#3253
Approved in 2026-01 TC39 plenary.
I had previously postponed adding these tests because they were affected
by tc39/proposal-temporal#3197. Now that TC39
has adopted a solution to that bug, we can add these and increase test
coverage for non-ISO8601 calendar addition in PlainYearMonth.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has consensus This has committee consensus needs review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant