diff --git a/spec/abstractops.html b/spec/abstractops.html index 816927763..a0cc3fe19 100644 --- a/spec/abstractops.html +++ b/spec/abstractops.html @@ -1411,6 +1411,36 @@

ISO String Time Zone Parse Records

+ +

Time Zone Identifier Parse Records

+

A Time Zone Identifier Parse Record is a Record value used to represent the result of parsing a time zone identifier either as an offset time zone or named time zone.

+

Time Zone Identifier Parse Records have the fields listed in .

+

The two fields are mutually exclusive. One of them always has the value ~empty~.

+ + + + + + + + + + + + + + + + + +
Field NameValueMeaning
[[Name]]a String or ~empty~ + The time zone's name (not necessarily an available named time zone identifier), or ~empty~ if the time zone is an offset time zone. +
[[OffsetMinutes]]an integer in the inclusive interval from -1439 to 1439, or ~empty~ + The time zone's UTC offset expressed as a number of minutes, or ~empty~ if the time zone is a named time zone. +
+
+
+

ISO Date-Time Parse Records

An ISO Date-Time Parse Record is a Record value used to represent the result of parsing an ISO 8601 / RFC 9557 string.

@@ -1706,7 +1736,7 @@

ParseTemporalTimeZoneString ( _timeZoneString_: a String, - ): either a normal completion containing a Record containing information about the time zone, or a throw completion + ): either a normal completion containing a Time Zone Identifier Parse Record, or a throw completion

description
@@ -1714,12 +1744,12 @@

It parses the argument as either a time zone identifier or an ISO 8601 / RFC 9557 string. The returned Record's fields are set as follows:
    -
  • If _timeZoneString_ is a named time zone identifier, then [[Name]] is _timeZoneString_ and [[OffsetMinutes]] is ~empty~.
  • -
  • Otherwise, if _timeZoneString_ is an offset time zone identifier, then [[OffsetMinutes]] is a signed integer and [[Name]] is ~empty~.
  • -
  • Otherwise, if _timeZoneString_ is a string with a time zone annotation containing a named time zone identifier, then [[Name]] is the time zone identifier contained in the annotation and [[OffsetMinutes]] is ~empty~.
  • -
  • Otherwise, if _timeZoneString_ is a string with a time zone annotation containing an offset time zone identifier, then [[OffsetMinutes]] is a signed integer and [[Name]] is ~empty~.
  • -
  • Otherwise, if _timeZoneString_ is a string using a *Z* offset designator, then [[Name]] is *"UTC"* and [[OffsetMinutes]] is ~empty~.
  • -
  • Otherwise, if _timeZoneString_ is a string using a numeric UTC offset, then [[OffsetMinutes]] is a signed integer and [[Name]] is ~empty~.
  • +
  • If _timeZoneString_ is a named time zone identifier, then [[Name]] is _timeZoneString_.
  • +
  • Otherwise, if _timeZoneString_ is an offset time zone identifier, then [[OffsetMinutes]] is the time zone's UTC offset.
  • +
  • Otherwise, if _timeZoneString_ is a string with a time zone annotation containing a named time zone identifier, then [[Name]] is the time zone identifier contained in the annotation.
  • +
  • Otherwise, if _timeZoneString_ is a string with a time zone annotation containing an offset time zone identifier, then [[OffsetMinutes]] is the time zone's UTC offset.
  • +
  • Otherwise, if _timeZoneString_ is a string using a *Z* offset designator, then [[Name]] is *"UTC"*.
  • +
  • Otherwise, if _timeZoneString_ is a string using a numeric UTC offset, then [[OffsetMinutes]] is that numeric UTC offset.
  • Otherwise, a *RangeError* is thrown.
diff --git a/spec/intl.html b/spec/intl.html index 4503f42ea..c75a790b7 100644 --- a/spec/intl.html +++ b/spec/intl.html @@ -452,7 +452,6 @@

1. If _parseResult_ contains more than one |MinuteSecond| Parse Node, throw a *RangeError* exception. 1. Let _offsetNanoseconds_ be ParseTimeZoneOffsetString? ParseDateTimeUTCOffset(_timeZone_). 1. Let _offsetMinutes_ be _offsetNanoseconds_ / (6 × 1010). - 1. Assert: _offsetMinutes_ is an integer. 1. Set _timeZone_ to FormatOffsetTimeZoneIdentifier(_offsetMinutes_). 1. Else if IsValidTimeZoneName(_timeZone_) is *true*, then 1. Else, diff --git a/spec/mainadditions.html b/spec/mainadditions.html index 7b67f2eca..4d197c739 100644 --- a/spec/mainadditions.html +++ b/spec/mainadditions.html @@ -695,7 +695,7 @@

ParseDateTimeUTCOffset ( _offsetString_: a String - ): either a normal completion containing an integer or a throw completion + ): either a normal completion containing an integer in the interval from -86400 × 109 (exclusive) to 86400 × 109 (exclusive), or a throw completion

diff --git a/spec/plaindate.html b/spec/plaindate.html index ca8f30a79..d8f9e6fa7 100644 --- a/spec/plaindate.html +++ b/spec/plaindate.html @@ -571,6 +571,7 @@

ISO Date Records

An ISO Date Record is a Record value used to represent a valid calendar date in the ISO 8601 calendar, although the year may be outside of the allowed range for Temporal. ISO Date Records are produced by the abstract operation CreateISODateRecord. + For any ISO Date Record _d_, IsValidISODate(_d_.[[Year]], _d_.[[Month]], _d_.[[Day]]) must return *true*.

ISO Date Records have the fields listed in .

diff --git a/spec/plaindatetime.html b/spec/plaindatetime.html index 6b4b3c13a..4fcb25b91 100644 --- a/spec/plaindatetime.html +++ b/spec/plaindatetime.html @@ -678,7 +678,7 @@

Abstract Operations

ISO Date-Time Records

An ISO Date-Time Record is a Record value used to represent a valid calendar date in the ISO 8601 calendar together with a clock time. - For any ISO Date-Time Record _r_, IsValidISODate(_r_.[[ISODate]].[[Year]], _r_.[[ISODate]][[Month]], _r_.[[ISODate]].[[Day]]) must return *true*, and IsValidTime(_r_.[[Time]].[[Hour]], _r_.[[Time]].[[Minute]], _r_.[[Time]].[[Second]], _r_.[[Time]].[[Millisecond]], _r_.[[Time]].[[Microsecond]], _r_.[[Time]].[[Nanosecond]]) must return *true*. + For any ISO Date-Time Record _r_, IsValidISODate(_r_.[[ISODate]].[[Year]], _r_.[[ISODate]].[[Month]], _r_.[[ISODate]].[[Day]]) must return *true*, and IsValidTime(_r_.[[Time]].[[Hour]], _r_.[[Time]].[[Minute]], _r_.[[Time]].[[Second]], _r_.[[Time]].[[Millisecond]], _r_.[[Time]].[[Microsecond]], _r_.[[Time]].[[Nanosecond]]) must return *true*. It is not necessary for ISODateTimeWithinLimits(_r_) to return *true*.

ISO Date-Time Records have the fields listed in .

diff --git a/spec/plaintime.html b/spec/plaintime.html index 94d1e2d5c..064d9c0d3 100644 --- a/spec/plaintime.html +++ b/spec/plaintime.html @@ -383,7 +383,7 @@

Properties of Temporal.PlainTime Instances

[[Time]] - A Time Record. + A Time Record. The [[Days]] field is ignored. @@ -409,7 +409,7 @@

Time Records

[[Days]] - an integer ≥ 0 + an integer A number of overflow days. @@ -455,7 +455,7 @@

_millisecond_: an integer in the inclusive interval from 0 to 999, _microsecond_: an integer in the inclusive interval from 0 to 999, _nanosecond_: an integer in the inclusive interval from 0 to 999, - optional _deltaDays_: a non-negative integer, + optional _deltaDays_: an integer, ): a Time Record

diff --git a/spec/timezone.html b/spec/timezone.html index df66de7d2..368e7ea09 100644 --- a/spec/timezone.html +++ b/spec/timezone.html @@ -133,7 +133,7 @@

FormatOffsetTimeZoneIdentifier ( - _offsetMinutes_: an integer, + _offsetMinutes_: an integer in the inclusive interval from -1439 to 1439, optional _style_: ~separated~ or ~unseparated~, ): an offset time zone identifier

@@ -158,7 +158,7 @@

FormatUTCOffsetNanoseconds ( - _offsetNanoseconds_: an integer, + _offsetNanoseconds_: an integer in the interval from -86400 × 109 (exclusive) to 86400 × 109 (exclusive), ): a String

@@ -184,7 +184,7 @@

FormatDateTimeUTCOffsetRounded ( - _offsetNanoseconds_: an integer, + _offsetNanoseconds_: an integer in the interval from -86400 × 109 (exclusive) to 86400 × 109 (exclusive), ): a String

@@ -194,7 +194,6 @@

1. Set _offsetNanoseconds_ to RoundNumberToIncrement(_offsetNanoseconds_, 60 × 109, ~half-expand~). 1. Let _offsetMinutes_ be _offsetNanoseconds_ / (60 × 109). - 1. Assert: _offsetMinutes_ is an integer. 1. Return FormatOffsetTimeZoneIdentifier(_offsetMinutes_). @@ -418,14 +417,12 @@

ParseTimeZoneIdentifier ( _identifier_: a String, - ): either a normal completion containing a Record with fields [[Name]] (a named time zone identifier or ~empty~) and [[OffsetMinutes]] (an integer or ~empty~), or a throw completion + ): either a normal completion containing a Time Zone Identifier Parse Record, or a throw completion

description
- If _identifier_ is a named time zone identifier, [[Name]] will be _identifier_ and [[OffsetMinutes]] will be ~empty~. - If _identifier_ is an offset time zone identifier, [[Name]] will be ~empty~ and [[OffsetMinutes]] will be a signed integer. - Otherwise, a *RangeError* will be thrown. + It parses _identifier_ to determine whether it identifies an offset time zone or named time zone. If _identifier_ is syntactically invalid, a *RangeError* will be thrown.
@@ -434,14 +431,13 @@

1. If _parseResult_ contains a |TimeZoneIANAName| Parse Node, then 1. Let _name_ be the source text matched by the |TimeZoneIANAName| Parse Node contained within _parseResult_. 1. NOTE: _name_ is syntactically valid, but does not necessarily conform to IANA Time Zone Database naming guidelines or correspond with an available named time zone identifier. - 1. Return the Record { [[Name]]: CodePointsToString(_name_), [[OffsetMinutes]]: ~empty~ }. + 1. Return Time Zone Identifier Parse Record { [[Name]]: CodePointsToString(_name_), [[OffsetMinutes]]: ~empty~ }. 1. Else, 1. Assert: _parseResult_ contains a |UTCOffset[~SubMinutePrecision]| Parse Node. 1. Let _offset_ be the source text matched by the |UTCOffset[~SubMinutePrecision]| Parse Node contained within _parseResult_. 1. Let _offsetNanoseconds_ be ! ParseDateTimeUTCOffset(CodePointsToString(_offset_)). 1. Let _offsetMinutes_ be _offsetNanoseconds_ / (60 × 109). - 1. Assert: _offsetMinutes_ is an integer. - 1. Return the Record { [[Name]]: ~empty~, [[OffsetMinutes]]: _offsetMinutes_ }. + 1. Return Time Zone Identifier Parse Record { [[Name]]: ~empty~, [[OffsetMinutes]]: _offsetMinutes_ }. diff --git a/spec/zoneddatetime.html b/spec/zoneddatetime.html index 9e8d90cd7..302252c68 100644 --- a/spec/zoneddatetime.html +++ b/spec/zoneddatetime.html @@ -887,7 +887,7 @@

_isoDate_: an ISO Date Record, _time_: a Time Record or ~start-of-day~, _offsetBehaviour_: ~option~, ~exact~, or ~wall~, - _offsetNanoseconds_: an integer, + _offsetNanoseconds_: an integer in the interval from -86400 × 109 (exclusive) to 86400 × 109 (exclusive), _timeZone_: an available time zone identifier, _disambiguation_: ~earlier~, ~later~, ~compatible~, or ~reject~, _offsetOption_: ~ignore~, ~use~, ~prefer~, or ~reject~,