-
Notifications
You must be signed in to change notification settings - Fork 108
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
Editorial: align time zone identifier text and AOs with ECMA-262 #876
Conversation
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
This PR updates ECMA-402 spec text to align with current ECMA-262 terminology and AOs for time zone identifiers. Changes include: * Replaces `DefaultTimeZone`, `CanonicalizeTimeZoneName`, and `IsValidTimeZoneName` with calls to current ECMA-262 abstract operations. * Refactors `AvailableCanonicalTimeZones` to call new ECMA-262 AOs, and renames it to `AvailablePrimaryTimeZoneIdentifiers`. * Adds a `GetAvailableNamedTimeZoneIdentifier` AO Temporal will eventually merge into ECMA-262, but it's not there yet so we need a copy here. * Replaces `#sec-time-zone-names with a "Use of the IANA Time Zone Database" section that extends ECMA-262's #sec-time-zone-identifiers section. * Adds a few paragraphs of editorial recommendations (borrowed from Temporal) about managing updates and builds of TZDB.
970f1b1
to
85c81cd
Compare
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
@sffc @gibson042 what is the process for ECMA-402 editorial PRs? I'd like to ideally get this reviewed before it gets too stale. |
The process is to get a review from @gibson042 or @ben-allen. |
@gibson042 @ben-allen Possible to review this before it gets too stale? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems both entirely sound and entirely clear. I trust @ptomato on all language derived from Temporal, and can't find any spec bugs.
Thank you for all your work on time zone names in general -- it's genuinely geopolitically important to get this right.
AvailableCalendars should return all possible aliases, so that other places in the spec (e.g. in the future, validating a string calendar ID in Temporal) can use them to determine whether a given input value is valid. This input value can subsequently be canonicalized by another abstract operation, CanonicalizeCalendar. In Intl.supportedValuesOf(), on the other hand, we should not return all possible aliases, so we filter them out using CanonicalizeCalendar before returning the list of AvailableCalendars codes as an array to the caller. See tc39/proposal-intl-enumeration#49. This is the part of that PR that I consider relevant for the future integration of Temporal. The time zone parts were already done as part of tc39#876. If desired, I could implement the rest of that PR, adding CanonicalizeCollation, CanonicalizeCurrency, CanonicalizeNumberingSystem, and CanonicalizeUnit as well. Closes: tc39#726
This PR resolves tc39#825 by adding spec text that defines how ECMA-402 implementations should decide which IANA time zone IDs should be primary vs. non-primary. This PR implements "Option C" in tc39#825 by deterministically defining ECMAScript's exceptions from the IANA Time Zone Database's defaults, and then pointing implementers at ICU as a convenient implementation of those exceptions. This PR also accommodates to web reality by aligning the 402 spec text with the existing behavior of ICU. This PR is stacked on top of tc39#876.
AvailableCalendars should return all possible aliases, so that other places in the spec (e.g. in the future, validating a string calendar ID in Temporal) can use them to determine whether a given input value is valid. This input value can subsequently be canonicalized by another abstract operation, CanonicalizeUValue, which we can use in several other places. In Intl.supportedValuesOf(), on the other hand, we should not return all possible aliases, so we filter them out using CanonicalizeUValue before returning the list of AvailableCalendars codes as an array to the caller. See tc39/proposal-intl-enumeration#49. This is the part of that PR that I consider relevant for the future integration of Temporal. The time zone parts were already done as part of tc39#876. If desired, I could implement the rest of that PR, adding CanonicalizeCollation, CanonicalizeCurrency, CanonicalizeNumberingSystem, and CanonicalizeUnit as well. Closes: tc39#726
AvailableCalendars should return all possible aliases, so that other places in the spec (e.g. in the future, validating a string calendar ID in Temporal) can use them to determine whether a given input value is valid. This input value can subsequently be canonicalized by another abstract operation, CanonicalizeUValue, which we can use in several other places. In Intl.supportedValuesOf(), on the other hand, we should not return all possible aliases, so we filter them out using CanonicalizeUValue before returning the list of AvailableCalendars codes as an array to the caller. See tc39/proposal-intl-enumeration#49. This is the part of that PR that I consider relevant for the future integration of Temporal. The time zone parts were already done as part of tc39#876. If desired, I could implement the rest of that PR, additionally supporting collation, currency, numbering system, and unit canonicalization. Closes: tc39#726
This PR updates ECMA-402 spec text to align with current ECMA-262 terminology and AOs for time zone identifiers. Changes include:
DefaultTimeZone
,CanonicalizeTimeZoneName
, andIsValidTimeZoneName
with calls to current ECMA-262 abstract operations.AvailableCanonicalTimeZones
to call new ECMA-262 AOs, and renames it toAvailablePrimaryTimeZoneIdentifiers
.GetAvailableNamedTimeZoneIdentifier
AO Temporal will eventually merge into ECMA-262, but it's not there yet so we need a copy here.#sec-time-zone-names
with a "Use of the IANA Time Zone Database" section that extends ECMA-262's#sec-time-zone-identifiers
section.