Skip to content
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 timeZoneName #958

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptomato
Copy link
Contributor

@ptomato ptomato commented Feb 7, 2025

Previously, if timeZoneName 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 time zone name in all its possible variants such as specific/generic, has been mentioned several times.

This change makes a lone timeZoneName be passed to the format matcher algorithm without added date/time components, and requires implementations to have at least a year-month-day-hour-minute-second-timeZoneName format available.

See: #461

Previously, if `timeZoneName` 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 time zone name in all its
possible variants such as specific/generic, has been mentioned several
times.

This change makes a lone `timeZoneName` be passed to the format matcher
algorithm without added date/time components, and requires
implementations to have at least a
year-month-day-hour-minute-second-timeZoneName format available.

See: tc39#461
@ptomato
Copy link
Contributor Author

ptomato commented Feb 7, 2025

See #957 for a similar change for era.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants