Skip to content

Conversation

hsivonen
Copy link
Contributor

@hsivonen hsivonen commented Oct 7, 2025

Description

Adds a note that the Japanese calendar doesn't actually at present work correctly in browser for dates before 1868-10-23.

Motivation

Helps readers avoid triggering a cross-browser bug.

Additional details

See https://unicode-org.atlassian.net/browse/CLDR-11375 (linked from the text of the PR) for the bug that causes all browsers to have incorrect data for the start of the Meiji era.

Also, see https://tc39.es/proposal-intl-era-monthcode/ , which requires browsers to use Gregorian eras for the Japanese calendar for dates before the Meiji era.

@hsivonen hsivonen requested a review from a team as a code owner October 7, 2025 09:10
@hsivonen hsivonen requested review from Josh-Cena and removed request for a team October 7, 2025 09:10
@github-actions github-actions bot added Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed labels Oct 7, 2025
Copy link
Contributor

github-actions bot commented Oct 7, 2025

Preview URLs

External URLs (2)

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

(comment last updated: 2025-10-09 16:54:09)

@hsivonen
Copy link
Contributor Author

hsivonen commented Oct 7, 2025

Side note: This calendar was taken into use on 1873-01-01, so the bug only affects proleptic dates.

@hsivonen hsivonen changed the title Document that the Japanese calendar is currently broken in browser forr dates before 1868-10-23 Oct 7, 2025
| `islamic-civil` | Hijri calendar, tabular/rule-based with leap year rule II (leap years 2,5,7,10,13,16,18,21,24,26,29 in the 30-year cycle (1-based numbering)) and Friday/civil epoch (July 16, 622 Julian / 0622-07-19 ISO) |
| `iso8601` | ISO calendar (variant of the Gregorian calendar with week rules and formatting parameters made region-independent) |
| `japanese` | Japanese Imperial calendar (this calendar adds an era for each new emperor, so the output year and era for a future date may not match the input year and era when your code runs on a future engine version) |
| `japanese` | Japanese Imperial calendar (this calendar adds an era for each new emperor, so the output year and era for a future date may not match the input year and era when your code runs on a future engine version. **Note:** As of October 2025, dates prior to 1868-10-23 ISO don't work correctly in browsers due to a CLDR bug.) |
Copy link
Member

Choose a reason for hiding this comment

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

IMO this isn't particularly helpful (what does "don't work" mean?) and I understand you are trying to make the text succinct. Can we move this into a note after the table, and inline the link rather than presenting it as a reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added longer remarks after the table and said more specifically what the behaviors that don't match the current spec proposal are.

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Copy link
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.

Great, thanks!

@Josh-Cena Josh-Cena merged commit 8792a4b into mdn:main Oct 9, 2025
8 checks passed
@hsivonen hsivonen deleted the meijistart branch October 9, 2025 17:05
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

2 participants