-
Notifications
You must be signed in to change notification settings - Fork 106
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
Normative: Don't add default formatting to lone era #957
base: main
Are you sure you want to change the base?
Conversation
Does this require any changes in https://tc39.es/ecma402/#sec-intl.datetimeformat-internal-slots? Right now neither When given the request
There's a removal penalty because |
I assumed no, because we also permit |
Yes, this is the important difference. Standalone |
Conclusion in the TG2 meeting today was:
|
Previously, if `era` was given by itself in the formatting options, the default formatting for the other date/time components would be added. This is inconsistent with what we do for `dayPeriod` where a lone `dayPeriod` produces formats such as "in the afternoon". The use case of obtaining the localized era name has also been mentioned several times. This change makes a lone `era` be passed to the format matcher algorithm without added date/time components, and requires implementations to have at least a year-month-day-era and year-month-era format available (which looks to be widely available across languages in CLDR.) See: tc39#461
28755d0
to
33a7366
Compare
I've updated this to modify only |
Previously, if
era
was given by itself in the formatting options, the default formatting for the other date/time components would be added. This is inconsistent with what we do fordayPeriod
where a lonedayPeriod
produces formats such as "in the afternoon".The use case of obtaining the localized era name has also been mentioned several times.
This change makes a lone
era
be passed to the format matcher algorithm without added date/time components, and requires implementations to have at least a year-month-day-era and year-month-era format available (which looks to be widely available across languages in CLDR.)See: #461