-
Notifications
You must be signed in to change notification settings - Fork 107
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
Should ECMA-402 spec text for time zone canonicalization refer to CLDR or to IANA as authoritative? #825
Comments
https://tc39.es/ecma402/ is careful to recommend use of CLDR data without ever requiring it, and I don't want to change that. My preference would be following the existing recommendation pattern for time zone resolution. |
As mentioned in the CLDR PR, Option A will lead to adding the following time zones IDs:
I don't think these IDs should be added. |
@anba Good points. I updated (B) in the OP accordingly. I also changed from prose to using a table to indicate how we'll handle all those legacy IDs. Better?
I agree. I updated (A) to exclude them. I also turned (A) into more formal spec text.
@gibson042 Could you explain more about why a recommendation is needed as opposed to normative text? The problem we want to solve is deviation between implementations, so seems reasonable to limit wiggle room. Or am I missing something that makes this distinction not matter? |
Basically, ECMA-402 just isn't the right place for such constraints because of https://tc39.es/ecma402/#sec-api-overview
ECMA-402 may add behavior that is not prohibited by ECMA-262, but may not prohibit behavior that is allowed by ECMA-262 except where ECMA-262 specifically delegates to it (as in |
TG2 meeting 2023-10-12: Option C above is preferred, with the caveat that we should make the spec text be a recommendation not a normative requirement. I'll prepare a PR. For specific detailed concerns like those raised in comments above, they're narrow enough that TG2 thought that we can hash them out in PR review. |
@justingrant The conclusion from the October meeting was that you would "draft a PR with a recommendation based on Option C that we can discuss further." |
Yep, sorry I haven't done this yet, but will try to get to it in the next few months. |
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 or 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 ICU4C which is used by most (all?) major ECMAScript engines to implement time zone features. This PR is stacked on top of an editorial PR to align ECMA-402's time-zone-related spec text with ECMA-262.
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 ICU4C which is used by most (all?) major ECMAScript engines to implement time zone features. This PR is stacked on top of an editorial PR to align ECMA-402's time-zone-related spec text with ECMA-262.
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 ICU4C which is used by most (all?) major ECMAScript engines to implement time zone features. This PR is stacked on top of an editorial PR to align ECMA-402's time-zone-related spec text with ECMA-262.
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 ICU4C which is used by most (all?) major ECMAScript engines to implement time zone features. This PR is stacked on top of an editorial PR to align ECMA-402's time-zone-related spec text with ECMA-262.
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.
PR available! #877 Sorry I didn't get this done in time for the meeting last week, but maybe we could put it on the agenda for the next one? |
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.
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 more clearly 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 and CLDR while providing deterministic rules that can guide future changes in CLDR data. Finally, this PR introduces a new StringSplitToList abstract operation and uses it to simplify AvailableNamedTimeZoneIdentifiers and IsWellFormedUnitIdentifier.
This PR resolves tc39#825 by adding spec text that more clearly 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 and CLDR while providing deterministic rules that can guide future changes in CLDR data. Finally, this PR introduces a new StringSplitToList abstract operation and uses it to simplify AvailableNamedTimeZoneIdentifiers and IsWellFormedUnitIdentifier.
This PR resolves tc39#825 by adding spec text that more clearly 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 and CLDR while providing deterministic rules that can guide future changes in CLDR data. Finally, this PR introduces a new StringSplitToList abstract operation and uses it to simplify AvailableNamedTimeZoneIdentifiers and IsWellFormedUnitIdentifier.
This PR resolves tc39#825 by adding spec text that more clearly 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 and CLDR while providing deterministic rules that can guide future changes in CLDR data. Finally, this PR introduces a new StringSplitToList abstract operation and uses it to simplify AvailableNamedTimeZoneIdentifiers and IsWellFormedUnitIdentifier.
This PR resolves tc39#825 by adding spec text that more clearly 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 and CLDR while providing deterministic rules that can guide future changes in CLDR data. Finally, this PR introduces a new StringSplitToList abstract operation and uses it to simplify AvailableNamedTimeZoneIdentifiers and IsWellFormedUnitIdentifier.
This PR resolves tc39#825 by adding spec text that more clearly 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 and CLDR while providing deterministic rules that can guide future changes in CLDR data. Finally, this PR introduces a new StringSplitToList abstract operation and uses it to simplify AvailableNamedTimeZoneIdentifiers and IsWellFormedUnitIdentifier.
CLDR in unicode-org/cldr#3105 will soon provide the ability to fetch modern canonical IDs for currently-problematic time zones like Asia/Calcutta and Europe/Kiev. ICU will also be adding an API to expose the IANA canonical ID. This will enable V8 and JSC to finally expose modern IANA canonical names like SpiderMonkey does, but without the separate IANA-based overrides that SpiderMonkey has had to maintain.
Before this change, it didn't make sense to have normative spec text in 402 to define which IDs should be primary (the new 262 term for canonical time zone ID) vs. non-primary. But with this CLDR/ICU change, it's finally practical to specify normative rules for determining which IDs are primary (and, if not, which primary ID they resolve to).
I can draft a PR with this normative text for discussion, but first there's one main question to answer: should we specify the rules solely as using CLDR data, solely as using IANA data, or should we specify rules for which IANA IDs are canonical that just happens to match what CLDR is doing?
As an illustration, here's two possible directions that we could take this spec text. Don't worry about the particular text used (it's very rough and will change) but the general approach of depending on CLDR vs. depending on IANA is where I'm most looking for feedback.
Which one is better? @sffc @gibson042 @anba @Constellation @FrankYFTang
Option A - Defer to CLDR
The Unicode Common Locale Data Repository (CLDR) defines which available named time zone identifiers are primary or non-primary, as well as which non-primary time zone identifiers resolve to which primary time zone identifiers. The following exceptions are applied:
The following spec text would replace the steps of https://tc39.es/proposal-temporal/#sup-availablenamedtimezoneidentifiers:
<type>
element that contains analias
attribute intimezone.xml
in the Unicode Common Locale Data Repository (CLDR), doalias
attribute.iana
attribute is present, let primary be the String value of that attribute; otherwise, let primary be the first element in aliases.Option B - Define using IANA only
Each Zone in the IANA Time Zone Database must be a primary time zone identifier and each Link name in the IANA Time Zone Database must be a non-primary time zone identifier that resolves to its corresponding Zone name, with the following exceptions:
TZ
column ofzone.tab
of the IANA Time Zone Database must be a primary time zone identifier.Option C - Define IANA rules, but explain how to use
timezone.xml
We could also merge both (A) and (B): define the IANA *and* explain how to use
timezone.xml
data to satisfy those rules. I'm not going to draft text for this yet because I'm unsure if anyone would want it, but I wanted to include this option here for discussion.The text was updated successfully, but these errors were encountered: