Skip to content

Fix #44618: Temporal.ZonedDateTime.add() offset ambiguity example and description#44693

Open
hanu-14 wants to merge 1 commit into
mdn:mainfrom
hanu-14:fix-44618-temporal-add
Open

Fix #44618: Temporal.ZonedDateTime.add() offset ambiguity example and description#44693
hanu-14 wants to merge 1 commit into
mdn:mainfrom
hanu-14:fix-44618-temporal-add

Conversation

@hanu-14

@hanu-14 hanu-14 commented Jul 12, 2026

Copy link
Copy Markdown

Fixes mdn/content#44618

The Description section of Temporal.ZonedDateTime.prototype.add() claimed that offset-ambiguous results use offset: "prefer", but the spec's AddZonedDateTime algorithm uses disambiguation: "compatible" — the same mechanism as the date-time validity bullet directly above.

Also fixes the second example: subtracting one day from 2024-11-04T01:00:00-05:00[America/New_York] yields 2024-11-03T01:00:00-04:00[America/New_York] (offset -04:00, not -05:00 as previously stated).

…add()

The description claimed add()/subtract() use offset: "prefer" for
offset-ambiguous results, but the spec's AddZonedDateTime uses
disambiguation: "compatible" (same as the date-time validity logic).

Also fix the second example where subtracting one day from
2024-11-04T01:00:00-05:00 should give 2024-11-03T01:00:00-04:00.

Fixes mdn#44618
@hanu-14 hanu-14 requested a review from a team as a code owner July 12, 2026 14:18
@hanu-14 hanu-14 requested review from sideshowbarker and removed request for a team July 12, 2026 14:18
@github-actions github-actions Bot added Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed labels Jul 12, 2026
@Josh-Cena Josh-Cena requested review from Josh-Cena and removed request for sideshowbarker July 12, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Temporal.ZonedDateTime.prototype.add(): incorrect example for offset ambiguity resolution during fall-back DST transition

2 participants