New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cyclic year doesn't show up in resolvedOptions #816
Comments
Per 11.2.3 Internal slots, 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 |
…solved components. r=dminor Map both "r" (related Gregorian year) and "U" (cyclic year name) to a resolved numeric year. From <tc39/ecma402#816 (comment)>: > 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. Fixes <tc39/ecma402#816>. Differential Revision: https://phabricator.services.mozilla.com/D189542
…solved components. r=dminor Map both "r" (related Gregorian year) and "U" (cyclic year name) to a resolved numeric year. From <tc39/ecma402#816 (comment)>: > 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. Fixes <tc39/ecma402#816>. Differential Revision: https://phabricator.services.mozilla.com/D189542
…solved components. r=dminor Map both "r" (related Gregorian year) and "U" (cyclic year name) to a resolved numeric year. From <tc39/ecma402#816 (comment)>: > 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. Fixes <tc39/ecma402#816>. Differential Revision: https://phabricator.services.mozilla.com/D189542 UltraBlame original commit: 54af7a41c821b47edcc55468310ba7c3e7a6573d
…solved components. r=dminor Map both "r" (related Gregorian year) and "U" (cyclic year name) to a resolved numeric year. From <tc39/ecma402#816 (comment)>: > 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. Fixes <tc39/ecma402#816>. Differential Revision: https://phabricator.services.mozilla.com/D189542 UltraBlame original commit: 54af7a41c821b47edcc55468310ba7c3e7a6573d
…solved components. r=dminor Map both "r" (related Gregorian year) and "U" (cyclic year name) to a resolved numeric year. From <tc39/ecma402#816 (comment)>: > 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. Fixes <tc39/ecma402#816>. Differential Revision: https://phabricator.services.mozilla.com/D189542 UltraBlame original commit: 54af7a41c821b47edcc55468310ba7c3e7a6573d
In CreateDateTimeFormat, it says:
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
andU
(related Gregorian and cycle year name):It works fine in formatToParts:
The text was updated successfully, but these errors were encountered: