Skip to content

Commit daca88c

Browse files
committed
Add "named" to available time zone text
This commit adds "named" to text and AOs dealing with available time identifiers. The purpose of this change is to clarify that offset time zones are not included in available time zone IDs.
1 parent a131620 commit daca88c

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

spec/intl.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ <h1>Time Zone Identifiers</h1>
5555
<p>
5656
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>.
5757
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.
58-
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.
59-
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.
58+
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.
59+
In an implementation that implements the ECMAScript Internationalization API Specification, available named time zone identifiers are the set of Zone and Link identifiers that are supported by an ECMAScript implementation.
6060
</p>
6161

6262
<p>
@@ -78,7 +78,7 @@ <h1>Time Zone Identifiers</h1>
7878

7979
<p>
8080
New Zone identifiers can be added to the IANA Time Zone Database, for example when one part of a country starts observing Daylight Saving Time differently from other parts, or when a new country declares independence.
81-
ECMAScript implementations are recommended to include newly-added identifiers as soon as possible into the results of AvailableTimeZoneIdentifiers.
81+
ECMAScript implementations are recommended to include newly-added identifiers as soon as possible into the results of AvailableNamedTimeZoneIdentifiers.
8282
Such prompt action ensures that ECMAScript programs receiving those identifiers from an external source (including the host's operating system) will be able to recognize and calculate using the new time zone.
8383
</p>
8484

@@ -151,12 +151,12 @@ <h1>
151151
</del>
152152

153153
<ins class="block">
154-
<emu-clause id="sup-availabletimezoneidentifiers" oldids="sec-availabletimezones" type="implementation-defined abstract operation">
155-
<h1>AvailableTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1>
154+
<emu-clause id="sup-availablenamedtimezoneidentifiers" oldids="sec-availabletimezones" type="implementation-defined abstract operation">
155+
<h1>AvailableNamedTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1>
156156
<dl class="header">
157157
<dt>description</dt>
158158
<dd>
159-
Its result describes all available time zone identifiers in this implementation, as well as the primary time zone identifier corresponding to each available identifier.
159+
Its result describes all available named time zone identifiers in this implementation, as well as the primary time zone identifier corresponding to each available named time zone identifier.
160160
The List is sorted by [[Identifier]] of each Time Zone Identifier Record.
161161
</dd>
162162
<dt>redefinition</dt>
@@ -182,11 +182,11 @@ <h1>AvailableTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1
182182

183183
<emu-note>
184184
Time zone identifiers in the IANA Time Zone Database can change over time.
185-
At a minimum, it is recommended that implementations limit changes to the result of AvailableTimeZoneIdentifiers to the changes allowed by GetAvailableTimeZoneIdentifier, for the lifetime of the surrounding agent.
186-
Due to the complexity of supporting these recommendations, it is recommended that the result of AvailableTimeZoneIdentifiers remains the same for the lifetime of the surrounding agent.
185+
At a minimum, it is recommended that implementations limit changes to the result of AvailableNamedTimeZoneIdentifiers to the changes allowed by GetAvailableNamedTimeZoneIdentifier, for the lifetime of the surrounding agent.
186+
Due to the complexity of supporting these recommendations, it is recommended that the result of AvailableNamedTimeZoneIdentifiers remains the same for the lifetime of the surrounding agent.
187187
</emu-note>
188188

189-
<p>This definition supersedes the definition provided in <emu-xref href="#sec-availabletimezoneidentifiers"></emu-xref>.</p>
189+
<p>This definition supersedes the definition provided in <emu-xref href="#sec-availablenamedtimezoneidentifiers"></emu-xref>.</p>
190190
</emu-clause>
191191
</ins>
192192
</emu-clause>
@@ -316,7 +316,7 @@ <h1>InitializeDateTimeFormat ( _dateTimeFormat_, _locales_, _options_ [ , <ins>_
316316
1. Else,
317317
1. <ins>If _toLocaleStringTimeZone_ is present, throw a *TypeError* exception.</ins>
318318
1. Set _timeZone_ to ? ToString(_timeZone_).
319-
1. <ins>Let _timeZoneIdentifierRecord_ be GetAvailableTimeZoneIdentifier(_timeZone_).</ins>
319+
1. <ins>Let _timeZoneIdentifierRecord_ be GetAvailableNamedTimeZoneIdentifier(_timeZone_).</ins>
320320
1. If <del>the result of IsValidTimeZoneName(_timeZone_) is *false*</del><ins>_timeZoneIdentifierRecord_ is ~empty~</ins>, then
321321
1. Throw a *RangeError* exception.
322322
1. Set _timeZone_ to <del>CanonicalizeTimeZoneName(_timeZone_)</del><ins>_timeZoneIdentifierRecord_.[[PrimaryIdentifier]]</ins>.
@@ -2538,7 +2538,7 @@ <h1>Temporal.ZonedDateTime.prototype.toLocaleString ( [ _locales_ [ , _options_
25382538
1. Let _dateTimeFormat_ be ! OrdinaryCreateFromConstructor(%DateTimeFormat%, %DateTimeFormat.protoytpe%, « [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[DayPeriod]], [[Hour]], [[Minute]], [[Second]], [[FractionalSecondDigits]], [[TimeZoneName]], [[HourCycle]], [[Pattern]], [[BoundFormat]] »).
25392539
1. Let _timeZone_ be ? ToTemporalTimeZoneIdentifier(_zonedDateTime_.[[TimeZone]]).
25402540
1. If IsTimeZoneOffsetString(_timeZone_) is *true*, throw a *RangeError* exception.
2541-
1. Let _timeZoneIdentifierRecord_ be GetAvailableTimeZoneIdentifier(_timeZone_).
2541+
1. Let _timeZoneIdentifierRecord_ be GetAvailableNamedTimeZoneIdentifier(_timeZone_).
25422542
1. If _timeZoneIdentifierRecord_ is ~empty~, throw a RangeError exception.
25432543
1. Set _timeZone_ to _timeZoneIdentifierRecord_.[[PrimaryIdentifier]].
25442544
1. Perform ? InitializeDateTimeFormat(_dateTimeFormat_, _locales_, _options_, _timeZone_).

spec/timezone.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ <h1>Time Zone Identifiers</h1>
1414
<p>
1515
Time zones in ECMAScript are described using <dfn variants="time zone identifier">time zone identifiers</dfn>, which must be Strings composed entirely of characters from the Unicode Basic Latin block.
1616
Time zone identifiers are case-insensitive and so are compared using ASCII case-insensitive comparisons.
17-
Built-in time zones may be <dfn variants="named time zone">named time zones</dfn>, represented by Strings for which GetAvailableTimeZoneIdentifier does not return ~empty~.
18-
They may also be <dfn variants="offset time zone">offset time zones</dfn>, represented by Strings for which IsTimeZoneOffsetString returns *true*.
17+
Built-in time zones may be <dfn variants="named time zone">named time zones</dfn>, identified by Strings for which GetAvailableNamedTimeZoneIdentifier does not return ~empty~.
18+
They may also be <dfn variants="offset time zone">offset time zones</dfn>, identified by Strings for which IsTimeZoneOffsetString returns *true*.
1919
</p>
2020
<p>
21-
<emu-xref href="#sec-temporal-timezone-constructor">The `Temporal.TimeZone` constructor</emu-xref>, when called with the name of a built-in time zone as the argument, will return a valid `Temporal.TimeZone` object.
21+
<emu-xref href="#sec-temporal-timezone-constructor">The `Temporal.TimeZone` constructor</emu-xref>, when called with the identifier of a built-in time zone as the argument, will return a valid `Temporal.TimeZone` object.
2222
When called with any other string, it will throw a *RangeError* exception.
2323
</p>
2424
<p>
2525
A <dfn variants="primary time zone identifiers">primary time zone identifier</dfn> represents the preferred identifier of a named time zone, while a <dfn variants="non-primary time zone identifiers">non-primary time zone identifier</dfn> is an alternate identifier for the same named time zone.
26-
The set of built-in, named time zone identifiers (both primary and non-primary) that are supported by an ECMAScript implementation are called available time zone identifiers.
26+
The set of built-in, named time zone identifiers (both primary and non-primary) that are supported by an ECMAScript implementation are called <dfn variants="available named time zone identifier">available named time zone identifiers</dfn>.
2727
</p>
2828
<p>
2929
At a minimum, ECMAScript implementations must support a built-in time zone with the identifier *"UTC"*, which must be primary.
30-
If the return value _tz_ of SystemTimeZoneIdentifier is different from *"UTC"*, and IsTimeZoneOffsetString(_tz_) is *false*, then implementations must also support _tz_ as a built-in time zone identifier, and it must be primary as well.
30+
If the return value _tz_ of SystemTimeZoneIdentifier is different from *"UTC"*, and IsTimeZoneOffsetString(_tz_) is *false*, then implementations must also support _tz_ as an available named time zone identifier, and it must be primary as well.
3131
In addition, implementations may support any number of other built-in time zones.
3232
</p>
3333
<p>
@@ -41,7 +41,7 @@ <h1>Time Zone Identifiers</h1>
4141

4242
<emu-clause id="sec-time-zone-identifier-record">
4343
<h1>Time Zone Identifier Record</h1>
44-
<p>A <dfn variants="Time Zone Identifier Records">Time Zone Identifier Record</dfn> is a Record used to describe an available time zone identifier, as well as the primary time zone identifier corresponding to it.</p>
44+
<p>A <dfn variants="Time Zone Identifier Records">Time Zone Identifier Record</dfn> is a Record used to describe an available named time zone identifier, as well as the primary time zone identifier corresponding to it.</p>
4545
<p>Time Zone Identifier Records have the fields listed in <emu-xref href="#table-time-zone-identifier-record-fields"></emu-xref>.</p>
4646
<emu-table id="table-time-zone-identifier-record-fields" caption="Time Zone Identifier Record Fields">
4747
<table>
@@ -53,7 +53,7 @@ <h1>Time Zone Identifier Record</h1>
5353
<tr>
5454
<td>[[Identifier]]</td>
5555
<td>a String</td>
56-
<td>An available time zone identifier that is supported by the implementation.</td>
56+
<td>An available named time zone identifier that is supported by the implementation.</td>
5757
</tr>
5858
<tr>
5959
<td>[[PrimaryIdentifier]]</td>
@@ -70,17 +70,17 @@ <h1>Time Zone Identifier Record</h1>
7070
</emu-note>
7171
</emu-clause>
7272

73-
<emu-clause id="sec-availabletimezoneidentifiers" type="implementation-defined abstract operation">
74-
<h1>AvailableTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1>
73+
<emu-clause id="sec-availablenamedtimezoneidentifiers" type="implementation-defined abstract operation">
74+
<h1>AvailableNamedTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1>
7575
<dl class="header">
7676
<dt>description</dt>
7777
<dd>
78-
Its result describes all available time zone identifiers in this implementation, as well as the primary time zone identifier corresponding to each available identifier.
78+
Its result describes all available named time zone identifiers in this implementation, as well as the primary time zone identifier corresponding to each available named time zone identifier.
7979
The List is sorted by [[Identifier]] of each Time Zone Identifier Record.
8080
</dd>
8181
</dl>
8282
<p>
83-
Time zone aware implementations, including all implementations that implement the ECMA-402 Internationalization API, must implement the AvailableTimeZoneIdentifiers abstract operation as specified in the ECMA-402 specification.
83+
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.
8484
For implementations that are not time zone aware, the following specification is used.
8585
</p>
8686
<emu-alg>
@@ -104,27 +104,27 @@ <h1>AvailableTimeZoneIdentifiers ( ): a List of Time Zone Identifier Records</h1
104104

105105
<emu-clause id="sec-getavailabletimezoneidentifier" type="abstract operation">
106106
<h1>
107-
GetAvailableTimeZoneIdentifier (
107+
GetAvailableNamedTimeZoneIdentifier (
108108
_timeZoneIdentifier_: a String,
109109
): either a Time Zone Identifier Record or ~empty~
110110
</h1>
111111

112112
<dl class="header">
113113
<dt>description</dt>
114114
<dd>
115-
If _timeZoneIdentifier_ is a time zone identifier that is supported by the implementation, then it returns one of the records in the List returned by AvailableTimeZoneIdentifiers.
115+
If _timeZoneIdentifier_ is a named time zone identifier that is supported by the implementation, then it returns one of the records in the List returned by AvailableNamedTimeZoneIdentifiers.
116116
Otherwise, ~empty~ will be returned.
117117
</dd>
118118
</dl>
119119
<emu-alg>
120-
1. For each element _record_ of AvailableTimeZoneIdentifiers(), do
120+
1. For each element _record_ of AvailableNamedTimeZoneIdentifiers(), do
121121
1. If _record_.[[Identifier]] is an ASCII-case-insensitive match for _timeZoneIdentifier_, return _record_.
122122
1. Return ~empty~.
123123
</emu-alg>
124124
<emu-note>
125125
Given the same value of _timeZoneIdentifier_ or any value that is an ASCII-case-insensitive match for it, it is recommended that the resulting Time Zone Identifier Record contain the same property values for the lifetime of the surrounding agent.
126-
Furthermore, it is recommended that time zone identifiers do not dynamically change from primary to non-primary, meaning that if _timeZoneIdentifier_ is a case-insensitive match for the [[PrimaryIdentifier]] property of the result of a previous call to GetAvailableTimeZoneIdentifier, then GetAvailableTimeZoneIdentifier(_timeZoneIdentifier_) will return a record where [[Identifier]] is [[PrimaryIdentifier]].
127-
Due to the complexity of supporting these recommendations, it is recommended that the result of AvailableTimeZoneIdentifiers (and therefore GetAvailableTimeZoneIdentifier) remains the same for the lifetime of the surrounding agent.
126+
Furthermore, it is recommended that time zone identifiers do not dynamically change from primary to non-primary, meaning that if _timeZoneIdentifier_ is a case-insensitive match for the [[PrimaryIdentifier]] property of the result of a previous call to GetAvailableNamedTimeZoneIdentifier, then GetAvailableNamedTimeZoneIdentifier(_timeZoneIdentifier_) will return a record where [[Identifier]] is [[PrimaryIdentifier]].
127+
Due to the complexity of supporting these recommendations, it is recommended that the result of AvailableNamedTimeZoneIdentifiers (and therefore GetAvailableNamedTimeZoneIdentifier) remains the same for the lifetime of the surrounding agent.
128128
</emu-note>
129129
</emu-clause>
130130

@@ -139,9 +139,9 @@ <h1>SystemTimeZoneIdentifier ( ): a String</h1>
139139

140140
<emu-alg>
141141
1. If the implementation only supports the UTC time zone, return *"UTC"*.
142-
1. Let _systemTimeZoneString_ be the String representing the environment's current time zone, either a time zone identifier or a UTC offset string.
142+
1. Let _systemTimeZoneString_ be the String representing the environment's current time zone, either a named time zone identifier or a UTC offset string.
143143
1. If IsTimeZoneOffsetString(_systemTimeZoneString_) is *true*, return _systemTimeZoneString_.
144-
1. Assert: _systemTimeZoneString_ is equal to the [[PrimaryIdentifier]] property of at least one Time Zone Identifier Record returned by AvailableTimeZoneIdentifiers().
144+
1. Assert: _systemTimeZoneString_ is equal to the [[PrimaryIdentifier]] property of at least one Time Zone Identifier Record returned by AvailableNamedTimeZoneIdentifiers().
145145
1. Return _systemTimeZoneString_.
146146
</emu-alg>
147147

@@ -183,7 +183,7 @@ <h1>Temporal.TimeZone ( _identifier_ )</h1>
183183
1. Throw a *TypeError* exception.
184184
1. Set _identifier_ to ? ToString(_identifier_).
185185
1. If IsTimeZoneOffsetString(_identifier_) is *false*, then
186-
1. Let _timeZoneIdentifierRecord_ be GetAvailableTimeZoneIdentifier(_identifier_).
186+
1. Let _timeZoneIdentifierRecord_ be GetAvailableNamedTimeZoneIdentifier(_identifier_).
187187
1. If _timeZoneIdentifierRecord_ is ~empty~, throw a *RangeError* exception.
188188
1. Set _identifier_ to _timeZoneIdentifierRecord_.[[PrimaryIdentifier]].
189189
1. Return ? CreateTemporalTimeZone(_identifier_, NewTarget).
@@ -457,7 +457,7 @@ <h1>
457457
1. Set _object_.[[Identifier]] to ! FormatTimeZoneOffsetString(_offsetNanosecondsResult_).
458458
1. Set _object_.[[OffsetNanoseconds]] to _offsetNanosecondsResult_.
459459
1. Else,
460-
1. Assert: GetAvailableTimeZoneIdentifier(_identifier_).[[PrimaryIdentifier]] is _identifier_.
460+
1. Assert: GetAvailableNamedTimeZoneIdentifier(_identifier_).[[PrimaryIdentifier]] is _identifier_.
461461
1. Set _object_.[[Identifier]] to _identifier_.
462462
1. Set _object_.[[OffsetNanoseconds]] to *undefined*.
463463
1. Return _object_.
@@ -648,7 +648,7 @@ <h1>
648648
1. If IsTimeZoneOffsetString(_name_) is *true*, then
649649
1. Let _offsetNanoseconds_ be ParseTimeZoneOffsetString(_name_).
650650
1. Return ! FormatTimeZoneOffsetString(_offsetNanoseconds_).
651-
1. Let _timeZoneIdentifierRecord_ be GetAvailableTimeZoneIdentifier(_name_).
651+
1. Let _timeZoneIdentifierRecord_ be GetAvailableNamedTimeZoneIdentifier(_name_).
652652
1. If _timeZoneIdentifierRecord_ is ~empty~, throw a *RangeError* exception.
653653
1. Return _timeZoneIdentifierRecord_.[[PrimaryIdentifier]].
654654
1. If _parseResult_.[[Z]] is *true*, return *"UTC"*.
@@ -669,7 +669,7 @@ <h1>
669669
</dl>
670670
<emu-alg>
671671
1. If _timeZoneSlotValue_ is a String, then
672-
1. Assert: Either IsTimeZoneOffsetString(_timeZoneSlotValue_) is *true*, or GetAvailableTimeZoneIdentifier(_timeZoneSlotValue_) is not ~empty~.
672+
1. Assert: Either IsTimeZoneOffsetString(_timeZoneSlotValue_) is *true*, or GetAvailableNamedTimeZoneIdentifier(_timeZoneSlotValue_) is not ~empty~.
673673
1. Return _timeZoneSlotValue_.
674674
1. Let _identifier_ be ? Get(_timeZoneSlotValue_, *"id"*).
675675
1. If _identifier_ is not a String, throw a *TypeError* exception.

0 commit comments

Comments
 (0)