Skip to content

Commit

Permalink
Changes from @gibson042 review
Browse files Browse the repository at this point in the history
  • Loading branch information
justingrant committed Apr 11, 2023
1 parent 949eac2 commit d83bab4
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,10 @@ <h1>The String Type</h1>
<emu-clause id="sec-ascii-case-sensitivity">
<h1>ASCII Case Insensitivity</h1>

<p>The String values used to identify time zone identifiers, as well as many other identifiers specified in ECMA-402 such as locales, currencies, scripts, and calendars, as are interpreted in an ASCII-case-insensitive manner, treating the code units 0x0041 through 0x005A (corresponding to Unicode characters LATIN CAPITAL LETTER A through LATIN CAPITAL LETTER Z) as equivalent to the corresponding code units 0x0061 through 0x007A (corresponding to Unicode characters LATIN SMALL LETTER A through LATIN SMALL LETTER Z), both inclusive. No other case folding equivalences are applied.</p>
<p>
The String values used as time zone identifiers, as well as many other identifiers specified in ECMA-402 such as locales, currencies, scripts, and calendars, as are interpreted in an <dfn>ASCII-case-insensitive</dfn> manner, treating the code units 0x0041 through 0x005A (corresponding to Unicode characters LATIN CAPITAL LETTER A through LATIN CAPITAL LETTER Z) as equivalent to the corresponding code units 0x0061 through 0x007A (corresponding to Unicode characters LATIN SMALL LETTER A through LATIN SMALL LETTER Z), both inclusive.
No other case folding equivalences are applied.
</p>
<emu-note>
For example, *"ß"* (U+00DF) must not match or be mapped to *"SS"* (U+0053, U+0053). *"ı"* (U+0131) must not match or be mapped to *"I"* (U+0049).
</emu-note>
Expand Down Expand Up @@ -32120,16 +32123,20 @@ <h1>Time Zone Identifiers</h1>

<p>
ECMAScript identifies time zones using the Zone and Link names of the IANA Time Zone Database <a href="https://www.iana.org/time-zones/">https://www.iana.org/time-zones/</a>.
These names are called <dfn variants="time zone identifier">time zone identifiers</dfn>, and are Strings composed entirely of characters from the Basic Latin Unicode block.
These names are called <dfn variants="time zone identifier">time zone identifiers</dfn>, and are Strings composed entirely of characters from the Unicode Basic Latin block.
Time zone identifiers are case-insensitive and so are compared using ASCII case-insensitive comparisons, but time zone identifiers returned by ECMAScript built-in objects always use the casing found in the IANA Time Zone Database.
A <dfn id="primary-time-zone-identifier" variants="primary time zone identifiers">primary time zone identifier</dfn> is a Zone name, and a <dfn variants="non-primary time zone identifiers">non-primary time zone identifier</dfn> is a Link name, respectively, in the IANA Time Zone Database except as specifically overridden by AvailableTimeZoneIdentifiers.
A <dfn variants="primary time zone identifiers">primary time zone identifier</dfn> is a Zone name, and a <dfn variants="non-primary time zone identifiers">non-primary time zone identifier</dfn> is a Link name, respectively, in the IANA Time Zone Database except as specifically overridden by AvailableTimeZoneIdentifiers.
The set of Zone and Link identifiers that are supported by an ECMAScript implementation are called available time zone identifiers.
</p>

<p>In the IANA Time Zone Database, the UTC time zone is represented by the Zone *"Etc/UTC"*, but for backwards compatibility and brevity reasons, *"UTC"* is the primary identifier used for this time zone in ECMAScript, while *"Etc/UTC"*, *"GMT"*, and *"Etc/GMT"* are all non-primary identifiers that resolve to *"UTC"*.</p>
<p>
In the IANA Time Zone Database, the UTC time zone is represented by the Zone *"Etc/UTC"*, and 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 treatment of *"Etc/UTC"*, *"Etc/GMT"*, and *"GMT"* (if available) as non-primary identifiers that resolve to *"UTC"*.
This is the only deviation from the IANA Time Zone Database that is required of an ECMAScript implementation.
</p>

<p>
<dfn id="time-zone-aware">Time zone aware</dfn> ECMAScript implementations support *"UTC"* and all other Zone and Link names (and <b>only</b> such names) from the IANA Time Zone Database, the mapping between Link names and corresponding Zone names, and the UTC offsets and transitions associated with Zone names that represent local political rules for that time zone.
<dfn>Time zone aware</dfn> ECMAScript implementations support *"UTC"* and all other Zone and Link names (and <b>only</b> such names) from the IANA Time Zone Database, the mapping between Link names and corresponding Zone names, and the UTC offsets and transitions associated with Zone names that represent local political rules for that time zone.
An ECMAScript implementation that includes the ECMA-402 Internationalization API <b>must</b> be time zone aware.
However, it is recommended that all ECMAScript implementations be time zone aware.
Furthermore, even non-time zone aware implementations that do not support the entire IANA Time Zone Database are still recommended to use IANA Time Zone Database identifiers to represent time zones.
Expand Down Expand Up @@ -32252,7 +32259,7 @@ <h1>Time Zone Identifier Record</h1>
<p>If [[Identifier]] is a primary time zone identifier, then [[Identifier]] will be [[PrimaryIdentifier]].</p>
</emu-note>
<emu-note>
<p>In time zone aware implementations it is required (and for all other implementations, recommended) that both [[Identifier]] and [[PrimaryIdentifier]] be a Zone or Link name from the IANA Time Zone Database <a href="https://www.iana.org/time-zones/">https://www.iana.org/time-zones/</a>.</p>
<p>It is required for time zone aware implementations (and recommended for all others) to use Zone and Link names from the IANA Time Zone Database <a href="https://www.iana.org/time-zones/">https://www.iana.org/time-zones/</a> for both [[Identifier]] and [[PrimaryIdentifier]].</p>
</emu-note>
</emu-clause>

Expand Down Expand Up @@ -32291,7 +32298,7 @@ <h1>AvailableTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1
</emu-note>
</emu-clause>

<emu-clause id="sec-hosttimezoneidentifier" oldids="sec-defaulttimezone" type="implementation-defined abstract operation">
<emu-clause id="sec-hosttimezoneidentifier" oldids="sec-defaulttimezone" type="host-defined abstract operation">
<h1>HostTimeZoneIdentifier ( ): a String</h1>
<dl class="header">
<dt>description</dt>
Expand All @@ -32304,9 +32311,9 @@ <h1>HostTimeZoneIdentifier ( ): a String</h1>
1. If the implementation only supports the UTC time zone, return *"UTC"*.
1. Let _hostTimeZoneString_ be the String representing the host environment's current time zone, either a time zone identifier or a UTC offset string.
1. If IsTimeZoneOffsetString(_hostTimeZoneString_) is *true*, return _hostTimeZoneString_.
1. Assert: GetAvailableTimeZoneIdentifier(_hostTimeZoneString_) is not ~empty~.
1. Assert: GetAvailableTimeZoneIdentifier(_hostTimeZoneString_).[[Identifier]] is GetAvailableTimeZoneIdentifier(_hostTimeZoneString_).[[PrimaryIdentifier]].
1. Return _hostTimeZoneString_.
1. Let _timeZoneIdentifierRecord_ be GetAvailableTimeZoneIdentifier(_hostTimeZoneString_).
1. Assert: _timeZoneIdentifierRecord_ is not ~empty~.
1. Return _timeZoneIdentifierRecord_.[[PrimaryIdentifier]].
</emu-alg>

<emu-note>
Expand Down Expand Up @@ -48915,6 +48922,7 @@ <h1>Host Hooks</h1>
<p><b>HostMakeJobCallback(...)</b></p>
<p><b>HostPromiseRejectionTracker(...)</b></p>
<p><b>InitializeHostDefinedRealm(...)</b></p>
<p><b>HostTimeZoneIdentifier(...)</b></p>
</emu-annex>

<emu-annex id="sec-host-defined-fields-summary">
Expand Down

0 comments on commit d83bab4

Please sign in to comment.