From c813110c2e034a87a4067522ef8715c028ef8c0d Mon Sep 17 00:00:00 2001
From: Justin Grant
This section lists amendments which must be made to ECMA-402, the ECMAScript® 2023 Internationalization API Specification.
Text to be added is marked like this, and text to be deleted is marked
This text is based on top of the ECMA-402 spec text from commit eb81befe8b739f976a3d6e68ec567302c4e217f0.
@@ -40,15 +41,89 @@
+ Implementations that adopt the ECMAScript Internationalization API Specification are time zone aware: they use the IANA Time Zone Database https://www.iana.org/time-zones/ to supply time zone identifiers and data used in ECMAScript calculations and formatting.
+ This section defines how the IANA Time Zone Database should be used by time zone aware implementations.
+
+ Except as overridden by AvailableNamedTimeZoneIdentifiers, 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.
+ No String may be an available named time zone identifier unless it is a Zone name or a Link name in the IANA Time Zone Database.
+ Available named time zone identifiers returned by ECMAScript built-in objects must use the casing found in the IANA Time Zone Database.
+
+ In the IANA Time Zone Database, the UTC time zone is represented by the Zone *"Etc/UTC"* which is distinct from the Zone *"Etc/GMT"*.
+ For historical reasons, ECMAScript uses *"UTC"* as the primary identifier for the former Zone and does not recognize the latter Zone as distinct, instead requiring *"Etc/UTC"*, *"Etc/GMT"*, and *"GMT"* (if available) to be non-primary identifiers that resolve to *"UTC"*.
+ This is the only deviation from the IANA Time Zone Database that is required of a time zone aware ECMAScript implementation.
+
+ The IANA Time Zone Database is typically updated between five and ten times per year.
+ These updates may add new Zone or Link names, may change Zones to Links, and may change the UTC offsets and transitions associated with any Zone.
+ ECMAScript implementations are recommended to include updates to the IANA Time Zone Database as soon as possible.
+ Such prompt action ensures that ECMAScript programs can accurately perform time-zone-sensitive calculations and can use newly-added available named time zone identifiers supplied by external input or the host environment.
+
+ If implementations revise time zone information during the lifetime of an agent, then which identifiers are supported, the primary time zone identifier associated with any identifier, and the UTC offsets and transitions associated with any Zone, must be consistent with results previously observed by that agent.
+ Due to the complexity of supporting this requirement, it is recommended that implementations maintain a fully consistent copy of the IANA Time Zone Database for the lifetime of each agent.
+ This section complements but does not supersede
- This definition supersedes the definition provided in
The ECMAScript 2023 Internationalization API Specification identifies time zones using the Zone and Link names of the IANA Time Zone Database. Their canonical form is the corresponding Zone name in the casing used in the IANA Time Zone Database except as specifically overridden by CanonicalizeTimeZoneName.
@@ -58,70 +133,71 @@ Amendments to the ECMAScript® 2023 Internationalization API Specification
like this.
+ Blocks of unmodified text between modified sections are marked by [...].
Cas
-
Time Zone Names
+
+ Use of the IANA Time Zone Database
-
+ PACKRATDATA=backzone PACKRATLIST=zone.tab
or a similar alternative that ensures at least one primary identifier for each ISO 3166-1 Alpha-2 country code.
AvailableNamedTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records
+
+
+
+ Time Zone Names
Time Zone Names
A conforming implementation must recognize *"UTC"* and all other Zone and Link names (and only such names), and use best available current and historical information about their offsets from UTC and their daylight saving time rules in calculations. However, the set of combinations of time zone name and language tag for which localized time zone names are available is implementation dependent.
- The abstract operation IsValidTimeZoneName takes argument _timeZone_, a String value, and verifies that it represents a valid Zone or Link name of the IANA Time Zone Database. -
++ The abstract operation IsValidTimeZoneName takes argument _timeZone_, a String value, and verifies that it represents a valid Zone or Link name of the IANA Time Zone Database. +
-backward
of the IANA Time Zone Database.
1. If _ianaTimeZone_ is *"Etc/UTC"* or *"Etc/GMT"*, return *"UTC"*.
1. Return _ianaTimeZone_.
This definition supersedes the definition provided in
+ This definition supersedes the definition provided in es2024,
This definition supersedes the definition provided in
This definition supersedes the definition provided in [removed].
+- This section intends to move the definitions of ASCII-uppercase, ASCII-lowercase, and ASCII-case-insensitive match from ECMA-402 into ECMA-262, after the definition of the ASCII word characters, and generalizes the former two definitions to cover sequences of code points. + This section intends to move the definitions of ASCII-uppercase, ASCII-lowercase, and ASCII-case-insensitive match from ECMA-402 into ECMA-262, after the definition of the ASCII word characters. + The definitions include minor editorial changes from ECMA-402 to address feedback from the ECMA-262 editors.
[...]
-- The ASCII-uppercase of a String value _S_ is the String value derived from _S_ by replacing each occurrence of an ASCII lowercase letter code unit (0x0061 through 0x007A, inclusive) with the corresponding ASCII uppercase letter code unit (0x0041 through 0x005A, inclusive) while preserving all other code units. The ASCII-uppercase of a sequence of Unicode code points _A_ is the sequence of code points derived from _A_ by replacing each occurrence of an ASCII lowercase letter code point (U+0061 through U+007A, inclusive) with the corresponding ASCII uppercase letter code point (U+0041 through U+005A, inclusive) while preserving all other code points. -
-- The ASCII-lowercase of a String value _S_ is the String value derived from _S_ by replacing each occurrence of an ASCII uppercase letter code unit (0x0041 through 0x005A, inclusive) with the corresponding ASCII lowercase letter code unit (0x0061 through 0x007A, inclusive) while preserving all other code units. The ASCII-lowercase of a sequence of Unicode code points _A_ is the sequence of code points derived from _A_ by replacing each occurrence of an ASCII uppercase letter code point (U+0041 through U+005A, inclusive) with the corresponding ASCII lowercase letter code point (U+0061 through U+007A, inclusive) while preserving all other code points. -
-- A String value _A_ is an ASCII-case-insensitive match for String value _B_ if the ASCII-uppercase of _A_ is exactly the same sequence of code units as the ASCII-uppercase of _B_. A sequence of Unicode code points _A_ is an ASCII-case-insensitive match for _B_ if _B_ is an ASCII-case-insensitive match for ! CodePointsToString(_A_). -
+The ASCII-uppercase of a String _S_ is the String derived from _S_ by replacing each occurrence of an ASCII lowercase letter code unit (0x0061 through 0x007A, inclusive) with the corresponding ASCII uppercase letter code unit (0x0041 through 0x005A, inclusive) while preserving all other code units.
+The ASCII-lowercase of a String _S_ is the String derived from _S_ by replacing each occurrence of an ASCII uppercase letter code unit (0x0041 through 0x005A, inclusive) with the corresponding ASCII lowercase letter code unit (0x0061 through 0x007A, inclusive) while preserving all other code units.
+A String _A_ is an ASCII-case-insensitive match for a String _B_ if the ASCII-lowercase of _A_ is the ASCII-lowercase of _B_.
[...]
+ +
+ Time zones in ECMAScript are represented by time zone identifiers, which are Strings composed entirely of code units in the inclusive interval from 0x0000 to 0x007F0x0021 to 0x007E.
+ Time zones supported by an ECMAScript implementation may be available named time zones, represented by the [[Identifier]] field of the Time Zone Identifier Records returned by AvailableNamedTimeZoneIdentifiers, or offset time zones, represented by Strings for which IsTimeZoneOffsetString returns *true*.
+ Time zone identifiers are compared using ASCII-case-insensitive comparisons.
+
+ A primary time zone identifier is the preferred identifier for an available named time zone. + A non-primary time zone identifier is an identifier for an available named time zone that is not a primary time zone identifier. + An available named time zone identifier is either a primary time zone identifier or a non-primary time zone identifier. + Each available named time zone identifier is associated with exactly one available named time zone. + Each available named time zone is associated with exactly one primary time zone identifier and zero or more non-primary time zone identifiers. +
++ ECMAScript implementations must support an available named time zone with the identifier *"UTC"*, which must be the primary time zone identifier for the UTC time zone. + In addition, implementations may support any number of other available named time zones. +
++ Implementations that follow the requirements for time zones as described in the ECMA-402 Internationalization API specification are called time zone aware. + Time zone aware implementations must support available named time zones corresponding to the Zone and Link names of the IANA Time Zone Database, and only such names. + In time zone aware implementations, a primary time zone identifier is a Zone name, and a non-primary time zone identifier is a Link name, respectively, in the IANA Time Zone Database except as specifically overridden by AvailableNamedTimeZoneIdentifiers as specified in the ECMA-402 specification. + Implementations that do not support the entire IANA Time Zone Database are still recommended to use IANA Time Zone Database names as identifiers to represent time zones. +
++ Time zone aware implementations, including all implementations that implement the ECMA-402 Internationalization API, must implement the AvailableNamedTimeZoneIdentifiers abstract operation as specified in the ECMA-402 specification. + For implementations that are not time zone aware, AvailableNamedTimeZoneIdentifiers performs the following steps when called: +
+A Temporal.TimeZone object is an Object referencing a time zone.
-- An ECMAScript implementation must support a number of built-in time zones. - At a minimum, implementations must support a built-in time zone named *"UTC"*. - If the return value _tz_ of DefaultTimeZone is different from *"UTC"*, and IsTimeZoneOffsetString(_tz_) is *false*, then implementations must support that time zone as a built-in time zone as well. - In addition, implementations may support any number of other built-in time zones. -
-- Built-in time zones may be named time zones, represented by Strings for which IsAvailableTimeZoneName returns *true*. - They may also be offset time zones, represented by Strings for which IsTimeZoneOffsetString returns *true*. -
-
-
- An ECMAScript implementation that includes the ECMA-402 Internationalization API must define built-in named time zones in correspondence with the Zone and Link names of the IANA Time Zone Database (and only such names) and use best available current and historical information about their offsets from UTC and their daylight saving time rules in calculations as specified in the ECMA-402 specification. - Other implementations are encouraged to do the same. -
- -- Once IsAvailableTimeZoneName(_timeZone_) has returned *true*, for the lifetime of the surrounding agent, IsAvailableTimeZoneName(_variant_) must return *true* if _variant_ is an ASCII-case-insensitive match for either _timeZone_ or CanonicalizeTimeZoneName(_timeZone_). -
- -- An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the CanonicalizeTimeZoneName abstract operation as specified in the ECMA-402 specification. -
-- The minimum implementation of CanonicalizeTimeZoneName for ECMAScript implementations that do not include local political rules for any time zones performs the following steps when called: -
- -- An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the AvailableTimeZones abstract operation as specified in the ECMA-402 specification. - If an ECMAScript implementation does not include the ECMA-402 API the following specification of the AvailableTimeZones abstract operation is used. -
-- For example, an ECMAScript implementation that does not include local political rules for any time zone could return a List with the single String *"UTC"* here. -
The Temporal.TimeZone constructor:
@@ -126,9 +33,9 @@