You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cyclic year doesn't show up in resolvedOptions #816
For each row in Table 7, except the header row, in table order, do
a. Let prop be the name given in the Property column of the row.
b. If bestFormat has a field [[<prop>]], then
i. Let p be bestFormat.[[<prop>]].
ii. Set dateTimeFormat's internal slot whose name is the Internal Slot column of the row to p.
In Table 7, the year is stated as being either "numeric" or "2-digit". However, this is clearly not reflected in the Chinese calendar resolvedOptions, which uses r and U (related Gregorian and cycle year name):
Per 11.2.3 Internal slots, "{relatedYear}" can only appear in a pattern string when the format record has a [[year]] field. And if a [[year]] field is present, CreateDateTimeFormat will set the Intl.DateTimeFormat's [[Year]] field to the format records [[year]] value. Intl.DateTimeFormat.prototype.resolvedOptions should then return the value of the [[Year]] internal slot.
IOW this seems to be spec'ed correctly, it's just that engines don't implement this correctly.
As long as the pattern string can't contain both "{year}" and "{relatedYear}", engines simply have to map the 'r' and 'U' Date Field Symbols to year: "numeric". (The related-year can only be "numeric", never "2-digit".)
Activity
anba commentedon Aug 7, 2023
Per 11.2.3 Internal slots,
"{relatedYear}"can only appear in a pattern string when the format record has a[[year]]field. And if a[[year]]field is present, CreateDateTimeFormat will set theIntl.DateTimeFormat's[[Year]]field to the format records[[year]]value. Intl.DateTimeFormat.prototype.resolvedOptions should then return the value of the[[Year]]internal slot.IOW this seems to be spec'ed correctly, it's just that engines don't implement this correctly.
As long as the pattern string can't contain both
"{year}"and"{relatedYear}", engines simply have to map the 'r' and 'U' Date Field Symbols toyear: "numeric". (The related-year can only be"numeric", never"2-digit".)Bug 1855748: Handle related year and year names when computing the re…
Bug 1855748: Handle related year and year names when computing the re…
Bug 1855748: Handle related year and year names when computing the re…
Bug 1855748: Handle related year and year names when computing the re…
Bug 1855748: Handle related year and year names when computing the re…
Bug 1855748: Handle related year and year names when computing the re…
sffc commentedon Sep 23, 2026
TG2 discussion: https://github.com/tc39/ecma402/blob/main/meetings/notes-2026-09-17.md#cyclic-year-doesnt-show-up-in-resolvedoptions-816
Let's fix this
sffc commentedon Oct 15, 2026
TG2 discussion: https://github.com/tc39/ecma402/blob/main/meetings/notes-2026-10-08.md#issue-816---cyclic-year-doesnt-show-up-in-resolvedoptions
The spec seems correct, but the engines are not correct. Please add test262.
PARTIAL Test date defaults
Test date defaults
jugglinmike commentedon Oct 21, 2026
I've submitted tests for review here: tc39/test262#5155