Skip to content

Commit

Permalink
Edits based on @ljharb review
Browse files Browse the repository at this point in the history
  • Loading branch information
justingrant committed May 6, 2023
1 parent a12431e commit 01031a1
Showing 1 changed file with 33 additions and 28 deletions.
61 changes: 33 additions & 28 deletions spec/intl.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ <h1><a href="https://tc39.es/ecma402/#sec-time-zone-support">Time Zone Support</
<h1>Time Zone Identifiers</h1>

<p>
The ECMAScript 2024 Internationalization API Specification 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>.
The ECMAScript Internationalization API Specification 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>.
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 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 AvailableTimeZoneIdentifiers.
In an implementation that implements the ECMAScript 2024 Internationalization API Specification, available time zone identifiers are the set of Zone and Link identifiers that are supported by an ECMAScript implementation.
In an implementation that implements the ECMAScript Internationalization API Specification, available time zone identifiers are the set of Zone and Link identifiers that are supported by an ECMAScript implementation.
</p>

<p>
Expand Down Expand Up @@ -103,14 +103,16 @@ <h1>Time Zone Identifiers</h1>
</ins>

<del class="block">
<p>
The ECMAScript 2024 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 AvailableTimeZoneIdentifiers.
</p>
<p>
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.
</p>

<p>
A conforming implementation must recognize *"UTC"* and all other Zone and Link names (and <strong>only</strong> 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 identifiers are available is implementation dependent.
</p>
<p>
A conforming implementation must recognize *"UTC"* and all other Zone and Link names (and <strong>only</strong> 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.
</p>
</del>

<del class="block">
<emu-clause id="sup-isvalidtimezonename">
<h1><a href="https://tc39.es/ecma402/#sec-isvalidtimezonename">IsValidTimeZoneName</a> ( _timeZone_ )</h1>

Expand All @@ -124,27 +126,29 @@ <h1><a href="https://tc39.es/ecma402/#sec-isvalidtimezonename">IsValidTimeZoneNa
1. Return *false*.
</emu-alg>
</emu-clause>
</del>

<emu-clause id="sup-canonicalizetimezonename" type="abstract operation">
<h1>
CanonicalizeTimeZoneName (
_timeZone_: a String value that is a valid time zone name as verified by IsValidTimeZoneName,
)
</h1>
<dl class="header">
<dt>description</dt>
<dd>It returns the canonical and case-regularized form of _timeZone_.</dd>
<dt>redefinition</dt>
<dd>true</dd>
</dl>
<del class="block">
<emu-clause id="sup-canonicalizetimezonename" type="abstract operation">
<h1>
CanonicalizeTimeZoneName (
_timeZone_: a String value that is a valid time zone name as verified by IsValidTimeZoneName,
)
</h1>
<dl class="header">
<dt>description</dt>
<dd>It returns the canonical and case-regularized form of _timeZone_.</dd>
<dt>redefinition</dt>
<dd>true</dd>
</dl>

<emu-alg>
1. Let _ianaTimeZone_ be the String value of the Zone or Link name of the IANA Time Zone Database that is an ASCII-case-insensitive match of _timeZone_.
1. If _ianaTimeZone_ is a Link name, let _ianaTimeZone_ be the String value of the corresponding Zone name as specified in the file <code>backward</code> of the IANA Time Zone Database.
1. If _ianaTimeZone_ is *"Etc/UTC"* or *"Etc/GMT"*, return *"UTC"*.
1. Return _ianaTimeZone_.
</emu-alg>
</emu-clause>
<emu-alg>
1. Let _ianaTimeZone_ be the String value of the Zone or Link name of the IANA Time Zone Database that is an ASCII-case-insensitive match of _timeZone_.
1. If _ianaTimeZone_ is a Link name, let _ianaTimeZone_ be the String value of the corresponding Zone name as specified in the file <code>backward</code> of the IANA Time Zone Database.
1. If _ianaTimeZone_ is *"Etc/UTC"* or *"Etc/GMT"*, return *"UTC"*.
1. Return _ianaTimeZone_.
</emu-alg>
</emu-clause>
</del>

<ins class="block">
Expand Down Expand Up @@ -1340,7 +1344,8 @@ <h1>Intl.DateTimeFormat.prototype.resolvedOptions ( )</h1>
</p>

<emu-note>
In this version of the ECMAScript 2024 Internationalization API, the *"timeZone"* property will be the name of the system time zone identifier if no *"timeZone"* property was provided in the options object provided to the Intl.DateTimeFormat constructor. The first edition left the *"timeZone"* property *undefined* in this case.
In this version of the ECMAScript Internationalization API, the *"timeZone"* property will be the name of the system time zone identifier if no *"timeZone"* property was provided in the options object provided to the Intl.DateTimeFormat constructor.
The first edition left the *"timeZone"* property *undefined* in this case.
</emu-note>

<emu-note>
Expand Down

0 comments on commit 01031a1

Please sign in to comment.