Skip to content

Fix unbalanced duration value in Temporal example#43709

Merged
Josh-Cena merged 1 commit intomdn:mainfrom
ivomurrell:patch-1
Apr 8, 2026
Merged

Fix unbalanced duration value in Temporal example#43709
Josh-Cena merged 1 commit intomdn:mainfrom
ivomurrell:patch-1

Conversation

@ivomurrell
Copy link
Copy Markdown
Contributor

Description

Fixed the resultant values listed in the examples of accessing the minutes property of an unbalanced Duration. It will be 30, not 1, when taking the minutes value of an unbalanced Duration initialised from { hours: 1, minutes: 30 }.

Motivation

This was the first of the Duration accessors I read about and I stared at the example for quite a while trying to work out where the 1 would have come from!

Additional details

Verified that this is now the correct value by running the expressions in Chrome's console.

I suspect this is just the result of an error when copying an example from one of the other `Duration` accessors.
@ivomurrell ivomurrell requested a review from a team as a code owner April 8, 2026 14:56
@ivomurrell ivomurrell requested review from sideshowbarker and removed request for a team April 8, 2026 14:56
@github-actions github-actions bot added Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed labels Apr 8, 2026
@Josh-Cena Josh-Cena requested review from Josh-Cena and removed request for sideshowbarker April 8, 2026 18:30
Copy link
Copy Markdown
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... nice. Thank you

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

@Josh-Cena Josh-Cena merged commit b61ce6b into mdn:main Apr 8, 2026
8 checks passed
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.

3 participants