You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/mainadditions.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -311,6 +311,8 @@ <h1>Time Zone Offset String <del>Format</del><ins>Formats</ins></h1>
311
311
<insclass="block">
312
312
<p>
313
313
ECMAScript defines string interchange formats for UTC offsets, derived from ISO 8601.
314
+
UTC offsets that represent offset time zone identifiers, or that are intended for interoperability with ISO 8601, use only hours and minutes and are specified by |UTCOffsetMinutePrecision|.
315
+
UTC offsets that represent the offset of a named or custom time zone can be more precise, and are specified by |UTCOffsetSubMinutePrecision|.
314
316
</p>
315
317
<p>
316
318
These formats are described by the ISO String grammar in <emu-xrefhref="#sec-temporal-iso8601grammar"></emu-xref>.
1. If _timeZone_.[[OffsetNanoseconds]] is not ~empty~, return FormatTimeZoneOffsetString(_timeZone_.[[OffsetNanoseconds]]).
242
+
1. If _timeZone_.[[OffsetMinutes]] is not ~empty~, return FormatTimeZoneOffsetString(_timeZone_.[[OffsetMinutes]] × (6 × 10<sup>10</sup>)).
243
243
1. Return _timeZone_.[[Identifier]].
244
244
</emu-alg>
245
245
</emu-clause>
@@ -281,11 +281,11 @@ <h1>Properties of Temporal.TimeZone Instances</h1>
281
281
</tr>
282
282
<tr>
283
283
<td>
284
-
[[OffsetNanoseconds]]
284
+
[[OffsetMinutes]]
285
285
</td>
286
286
<td>
287
-
An integer for nanoseconds representing the constant offset of this time zone relative to UTC, or ~empty~ if the instance represents a named time zone.
288
-
If not ~empty~, this value must be greater than −8.64 × 10<sup>13</sup> nanoseconds (−24 hours) and smaller than +8.64 × 10<sup>13</sup> nanoseconds (+24 hours).
287
+
An integer for minutes representing the constant offset of this time zone relative to UTC, or ~empty~ if the instance represents a named time zone.
288
+
If not ~empty~, this value must be greater than −1440 minutes (−24 hours) and smaller than +1440 minutes (+24 hours).
289
289
</td>
290
290
</tr>
291
291
</tbody>
@@ -322,18 +322,18 @@ <h1>
322
322
</dl>
323
323
<emu-alg>
324
324
1. If _newTarget_ is not present, set _newTarget_ to %Temporal.TimeZone%.
325
-
1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.TimeZone.prototype%"*, « [[InitializedTemporalTimeZone]], [[Identifier]], [[OffsetNanoseconds]] »).
325
+
1. Let _object_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Temporal.TimeZone.prototype%"*, « [[InitializedTemporalTimeZone]], [[Identifier]], [[OffsetMinutes]] »).
326
326
1.Assert:_identifier_ is an available named time zone identifier or an offset time zone identifier.
327
327
1. Let _parseResult_ be ParseTimeZoneIdentifier(_identifier_).
328
328
1.Assert:_parseResult_ is not ~unmatched~.
329
-
1. If _parseResult_.[[OffsetNanoseconds]] is not ~empty~, then
329
+
1. If _parseResult_.[[OffsetMinutes]] is not ~empty~, then
330
330
1. Set _object_.[[Identifier]] to ~empty~.
331
-
1. Set _object_.[[OffsetNanoseconds]] to _parseResult_.[[OffsetNanoseconds]].
331
+
1. Set _object_.[[OffsetMinutes]] to _parseResult_.[[OffsetMinutes]].
332
332
1. Else,
333
333
1.Assert:_parseResult_.[[Name]] is not ~empty~.
334
334
1.Assert: GetAvailableNamedTimeZoneIdentifier(_identifier_).[[PrimaryIdentifier]] is _identifier_.
335
335
1. Set _object_.[[Identifier]] to _identifier_.
336
-
1. Set _object_.[[OffsetNanoseconds]] to ~empty~.
336
+
1. Set _object_.[[OffsetMinutes]] to ~empty~.
337
337
1. Return _object_.
338
338
</emu-alg>
339
339
@@ -344,7 +344,7 @@ <h1>
344
344
Although the [[Identifier]] internal slot is a String in this specification, implementations may choose to store named time zone identifiers it in any other form (for example as an enumeration or index into a List of identifier strings) as long as the String can be regenerated when needed.
345
345
</p>
346
346
<p>
347
-
Similar flexibility exists for the storage of the [[OffsetNanoseconds]] internal slot, which can be interchangeably represented as a 6-byte integer or as a String value that may be as long as 19 characters.
347
+
Similar flexibility exists for the storage of the [[OffsetMinutes]] internal slot, which can be interchangeably represented as a 12-bit integer or as a 6-character ±HH:MM string.
348
348
ParseTimeZoneIdentifier and FormatTimeZoneOffsetString may be used to losslessly convert one representation to the other.
349
349
Implementations are free to store either or both representations.
350
350
</p>
@@ -563,8 +563,8 @@ <h1>
563
563
1. Let _parseResult_ be ? ParseTemporalTimeZoneString(_identifier_).
564
564
1. If _parseResult_.[[Name]] is not *undefined*, then
565
565
1. Let _name_ be _parseResult_.[[Name]].
566
-
1. Let _offsetNanoseconds_ be ParseTimeZoneIdentifier(_name_).[[OffsetNanoseconds]].
567
-
1. If _offsetNanoseconds_ is not ~empty~, return FormatTimeZoneOffsetString(_offsetNanoseconds_).
566
+
1. Let _offsetMinutes_ be ParseTimeZoneIdentifier(_name_).[[OffsetMinutes]].
567
+
1. If _offsetMinutes_ is not ~empty~, return FormatTimeZoneOffsetString(_offsetMinutes_ × (6 × 10<sup>10</sup>)).
568
568
1. Let _timeZoneIdentifierRecord_ be GetAvailableNamedTimeZoneIdentifier(_name_).
569
569
1. If _timeZoneIdentifierRecord_ is ~empty~, throw a *RangeError* exception.
0 commit comments