Skip to content

Reference for stage 2.7 intl-era-monthcode#42660

Merged
Josh-Cena merged 4 commits intomdn:mainfrom
codersjj:fix/42565-temporal-plaindate-example
Feb 17, 2026
Merged

Reference for stage 2.7 intl-era-monthcode#42660
Josh-Cena merged 4 commits intomdn:mainfrom
codersjj:fix/42565-temporal-plaindate-example

Conversation

@codersjj
Copy link
Copy Markdown
Contributor

@codersjj codersjj commented Jan 7, 2026

Fixes #42565.

This PR documents the following changes specified by Intl era and monthCode:

  • The Chinese calendar's epoch is the same as ISO 8601 instead of 2637 BCE (examples with different epochs replaced with hebrew)
  • The Gregorian calendar uses "bc" and "bce" instead of "gregory" and "gregory-inverse"
  • The calendar descriptions from the proposal are ported to the Intl.supportedValuesOf table
  • The eras and month codes of "supported calendars" are now fully specified

The Chinese calendar example incorrectly stated that year 2021 in the
Chinese calendar corresponds to 616 BC in the ISO calendar. According
to the TC39 Intl era and monthCode proposal, the Chinese calendar's
epoch year is now ISO year 0, so year 2021 aligns with ISO year 2021.

This commit:
- Updates the Chinese calendar example comment to reflect the correct
  epoch year alignment
- Corrects the expected output from "-000616-08-12[u-ca=chinese]" to
  "2021-08-08[u-ca=chinese]"
- Adds a new Hebrew calendar example to demonstrate a calendar with a
  significantly different epoch year (5781 Hebrew = 2021 ISO)

Fixes mdn#42565
@codersjj codersjj requested a review from a team as a code owner January 7, 2026 14:18
@codersjj codersjj requested review from Josh-Cena and removed request for a team January 7, 2026 14:18
@github-actions github-actions Bot added Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed labels Jan 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 7, 2026

Preview URLs (16 pages)
External URLs (4)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf
Title: Intl.supportedValuesOf()


URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/era
Title: Temporal.PlainDate.prototype.era

(comment last updated: 2026-02-10 03:58:18)

@Josh-Cena
Copy link
Copy Markdown
Member

Hey, I'm going to add some more changes to this PR related to the calendar and month code changes. It's going to take some time but you don't have to worry about this. Thanks for sending this in!

@codersjj codersjj closed this Jan 22, 2026
@codersjj codersjj reopened this Jan 22, 2026
@codersjj
Copy link
Copy Markdown
Contributor Author

Hey, I'm going to add some more changes to this PR related to the calendar and month code changes. It's going to take some time but you don't have to worry about this. Thanks for sending this in!

Sounds good, thanks for taking this on! Let me know if you need anything from my side.

@Josh-Cena Josh-Cena requested a review from a team as a code owner January 24, 2026 03:05
@Josh-Cena Josh-Cena requested review from dipikabh and removed request for a team January 24, 2026 03:05
@github-actions github-actions Bot added system [PR only] Infrastructure and configuration for the project size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Jan 24, 2026
@Josh-Cena Josh-Cena changed the title Fix incorrect Chinese calendar example in Temporal.PlainDate.from docs Reference for stage 2.7 intl-era-monthcode Jan 24, 2026
@Josh-Cena
Copy link
Copy Markdown
Member

Asked for feedback from @ben-allen

Copy link
Copy Markdown
Contributor

@ben-allen ben-allen left a comment

Choose a reason for hiding this comment

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

looks good! I've left a few notes -- once this lands I'm going to go through and do another round of era/monthCode updates, since there's been some significant changes in the past couple of months.

@Josh-Cena
Copy link
Copy Markdown
Member

@ben-allen sorry for the wait; PTAL, thanks!

@ben-allen
Copy link
Copy Markdown
Contributor

LGTM!

@Josh-Cena Josh-Cena merged commit 9b86874 into mdn:main Feb 17, 2026
8 checks passed
pranjal2004838 pushed a commit to pranjal2004838/content that referenced this pull request Feb 25, 2026
* Fix incorrect Chinese calendar example in Temporal.PlainDate.from docs

The Chinese calendar example incorrectly stated that year 2021 in the
Chinese calendar corresponds to 616 BC in the ISO calendar. According
to the TC39 Intl era and monthCode proposal, the Chinese calendar's
epoch year is now ISO year 0, so year 2021 aligns with ISO year 2021.

This commit:
- Updates the Chinese calendar example comment to reflect the correct
  epoch year alignment
- Corrects the expected output from "-000616-08-12[u-ca=chinese]" to
  "2021-08-08[u-ca=chinese]"
- Adds a new Hebrew calendar example to demonstrate a calendar with a
  significantly different epoch year (5781 Hebrew = 2021 ISO)

Fixes mdn#42565

* Fully document eras and monthCodes

* Fixes

---------

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:JS JavaScript docs size/m [PR only] 51-500 LoC changed system [PR only] Infrastructure and configuration for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The example of Temporal.PlainDate should be revised

4 participants