From 9d834b22c41f3a0f749fbc8c9866756c6c406768 Mon Sep 17 00:00:00 2001
From: Philip Chimento Amendments to the ECMAScript® 2021 Internationalization API Specification
+
+ The ECMAScript 2021 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. +
+ ++ All registered Zone and Link names are allowed. Implementations must recognize all 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. +
+ +This definition supersedes the definition provided in
+ The IsValidTimeZoneName abstract operation verifies that the _timeZone_ argument (which must be a String value) represents a valid Zone or Link name of the IANA Time Zone Database. +
+
+ The abstract operation returns true if _timeZone_, converted to upper case as described in
This definition supersedes the definition provided in
+ The CanonicalizeTimeZoneName abstract operation returns the canonical and case-regularized form of the _timeZone_ argument (which must be a String value that is a valid time zone name as verified by the IsValidTimeZoneName abstract operation). + The following steps are taken: +
+ +
+ The Intl.DateTimeFormat constructor allows this time zone name; if the time zone is not specified, the host environment's current time zone is used. Implementations shall support UTC and the host environment's current time zone returned from DefaultTimeZone (if different from UTC) in formatting.
+
This definition supersedes the definition provided in
+ The DefaultTimeZone abstract operation returns a String value representing the valid (
A Temporal.TimeZone object is an immutable Object referencing a time zone.
++ The normative intention of this section is that an implementation must support UTC and a local time zone, which may also be UTC, or a named time zone like `"Europe/London"`, or an offset time zone like `"+01:00"`; and that the local time zone must in any case be consistent with the time zone offsets that can be determined using `Date.prototype.getTimezoneOffset()`, `Date.prototype.toString()`, and `Date.prototype.toTimeString()`. + The exact formal definition of "local time zone" is still to be determined. +
++ 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 of DefaultTimeZone is different from *"UTC"*, and does not satisfy the syntax of a |TimeZoneNumericUTCOffset|, 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 IsValidTimeZoneName returns *true*. + They may also be offset time zones, represented by Strings that conform to the syntax of |TimeZoneNumericUTCOffset|. +
+
+ Implementations are encouraged to support the Zone and Link names of the IANA Time Zone Database, and to use the best available current and historical information about their offsets from UTC and their daylight saving time rules in calculations. +
++ An ECMAScript implementation that includes the ECMA-402 Internationalization API has additional requirements for the built-in time zones that must be supported, as specified in the ECMA-402 specification. +
+ ++ An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the IsValidTimeZoneName 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 IsValidTimeZoneName abstract operation is used. +
++ The abstract operation IsValidTimeZoneName takes argument _timeZone_, a String value. It returns *true* if _timeZone_, converted to upper case, is equal to one of the built-in named time zone names, converted to upper case. + It returns *false* otherwise. +
++ Once IsValidTimeZoneName has returned *true* for a particular value of _timeZone_, for the lifetime of the surrounding agent, it may no longer return *false* for that value of _timeZone_, or for the value of CanonicalizeTimeZoneName(_timeZone_). +
+The minimum implementation of IsValidTimeZoneName, supporting only the *"UTC"* time zone, performs the following steps when called: +
+ ++ An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the CanonicalizeTimeZoneName 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 CanonicalizeTimeZoneName abstract operation is used. +
++ The abstract operation CanonicalizeTimeZoneName takes argument _timeZone_, a String value, and returns the canonical and case-regularized form of _timeZone_. +
++ CanonicalizeTimeZoneName may only be called with a _timeZone_ parameter that is a valid time zone name according to IsValidTimeZoneName. +
+The minimum implementation of CanonicalizeTimeZoneName, supporting only the *"UTC"* time zone, performs the following steps when called: +
+ ++ An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the DefaultTimeZone 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 DefaultTimeZone abstract operation is used. +
+
+ The DefaultTimeZone abstract operation returns a String value representing the host environment's current time zone, which is either a valid (
From c502fef32b65c12f1cceb30791ce26255ca23918 Mon Sep 17 00:00:00 2001
From: Ms2ger
- The normative intention of this section is that an implementation must support UTC and a local time zone, which may also be UTC, or a named time zone like `"Europe/London"`, or an offset time zone like `"+01:00"`; and that the local time zone must in any case be consistent with the time zone offsets that can be determined using `Date.prototype.getTimezoneOffset()`, `Date.prototype.toString()`, and `Date.prototype.toTimeString()`.
+ The normative intention of this section is that an implementation must support UTC and a local time zone, which may also be UTC, or a named time zone like *"Europe/London"*, or an offset time zone like *"+01:00"*; and that the local time zone must in any case be consistent with the time zone offsets that can be determined using `Date.prototype.getTimezoneOffset()`, `Date.prototype.toString()`, and `Date.prototype.toTimeString()`.
The exact formal definition of "local time zone" is still to be determined.
Time Zone Names
Time Zone Names
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 IsValidTimeZoneName returns *true*. - They may also be offset time zones, represented by Strings that conform to the syntax of |TimeZoneNumericUTCOffset|. + Built-in time zones may be named time zones, represented by Strings for which IsValidTimeZoneName returns *true*. + They may also be offset time zones, represented by Strings that conform to the syntax of |TimeZoneNumericUTCOffset|.
CanonicalizeTimeZoneName may only be called with a _timeZone_ parameter that is a valid time zone name according to IsValidTimeZoneName.
-The minimum implementation of CanonicalizeTimeZoneName, supporting only the *"UTC"* time zone, performs the following steps when called: +
+ The minimum implementation of CanonicalizeTimeZoneName, supporting only the *"UTC"* time zone, performs the following steps when called: