diff --git a/spec/intl.html b/spec/intl.html index d97066e5fd..896de36a30 100644 --- a/spec/intl.html +++ b/spec/intl.html @@ -396,10 +396,9 @@

DateTime Format Functions

-

FormatDateTimePattern ( _dateTimeFormat_, _pattern_, _patternParts_, _x__epochNanoseconds_, _rangeFormatOptions_ )

- +

FormatDateTimePattern ( _dateTimeFormat_, _pattern_, _patternParts_, _x__epochNanoseconds_, _rangeFormatOptions_, _timeZone_ )

- The FormatDateTimePattern abstract operation is called with arguments _dateTimeFormat_ (which must be an object initialized as a DateTimeFormat), _pattern_ (which is a Record of the type contained by the %DateTimeFormat%.[[LocaleData]].[[<_locale_>]].[[formats]].[[<_calendar_>]] List as described in ), _patternParts_ (which is a list of Records as returned by PartitionPattern), _x__epochNanoseconds_ (which must be a NumberBigInt value), and _rangeFormatOptions_ (which is a range pattern Record as used in [[rangePattern]] or *undefined*), interprets _x_ as a time value as specified in ES2023, , and creates the corresponding parts according _pattern_ and to the effective locale and the formatting options of _dateTimeFormat_ and _rangeFormatOptions_. The following steps are taken: + The FormatDateTimePattern abstract operation is called with arguments _dateTimeFormat_ (which must be an object initialized as a DateTimeFormat), _pattern_ (which is a Record of the type contained by the %DateTimeFormat%.[[LocaleData]].[[<_locale_>]].[[formats]].[[<_calendar_>]] List as described in ), _patternParts_ (which is a list of Records as returned by PartitionPattern), _x__epochNanoseconds_ (which must be a NumberBigInt value), _rangeFormatOptions_ (which is a range pattern Record as used in [[rangePattern]] or *undefined*) and _timeZone_, interprets _x_ as a time value as specified in ES2023, , and creates the corresponding parts according _pattern_ and to the effective locale and the formatting options of _dateTimeFormat_ and _rangeFormatOptions_. The following steps are taken:

@@ -419,7 +418,9 @@

FormatDateTimePattern ( _dateTimeFormat_, _pattern_, _patternPart 1. Perform ! CreateDataPropertyOrThrow(_nf3Options_, *"minimumIntegerDigits"*, _fractionalSecondDigits_). 1. Perform ! CreateDataPropertyOrThrow(_nf3Options_, *"useGrouping"*, *false*). 1. Let _nf3_ be ? Construct(%NumberFormat%, « _locale_, _nf3Options_ »). - 1. Let _tm_ be ToLocalTime(_x__epochNanoseconds_, _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). + 1. If _dateTimeFormat_.[[TimeZone]] is not *undefined*, then + 1. Throw a *RangeError* exception. + 1. Let _tm_ be ToLocalTime(_epochNanoseconds_, _dateTimeFormat_.[[Calendar]], _timeZone_). 1. Let _result_ be a new empty List. 1. For each Record { [[Type]], [[Value]] } _patternPart_ in _patternParts_, do 1. Let _p_ be _patternPart_.[[Type]]. @@ -436,7 +437,7 @@

FormatDateTimePattern ( _dateTimeFormat_, _pattern_, _patternPart 1. Append a new Record { [[Type]]: _p_, [[Value]]: _fv_ } as the last element of the list _result_. 1. Else if _p_ is equal to *"timeZoneName"*, then 1. Let _f_ be _dateTimeFormat_.[[TimeZoneName]]. - 1. Let _v_ be _dateTimeFormat_.[[TimeZone]]. + 1. Let _v_ be _dateTimeFormat_.[[TimeZone]]_timeZone_. 1. Let _fv_ be a String value representing _v_ in the form given by _f_; the String value depends upon the implementation and the effective locale of _dateTimeFormat_. The String value may also depend on the value of the [[InDST]] field of _tm_ if _f_ is *"short"*, *"long"*, *"shortOffset"*, or *"longOffset"*. If the implementation does not have a localized representation of _f_, then use the String value of _v_ itself. 1. Append a new Record { [[Type]]: _p_, [[Value]]: _fv_ } as the last element of the list _result_. 1. Else if _p_ matches a Property column of the row in , then @@ -497,7 +498,7 @@

PartitionDateTimePattern ( _dateTimeFormat_, _x_ )

1. Let _x_ be ? HandleDateTimeValue(_dateTimeFormat_, _x_). 1. Let _patternParts_ be PartitionPattern(_dateTimeFormat_.[[Pattern]]_x_.[[pattern]]). - 1. Let _result_ be ? FormatDateTimePattern(_dateTimeFormat_, _x_.[[pattern]], _patternParts_, _x__x_.[[epochNanoseconds]], *undefined*). + 1. Let _result_ be ? FormatDateTimePattern(_dateTimeFormat_, _x_.[[pattern]], _patternParts_, _x__x_.[[epochNanoseconds]], *undefined*, x.[[timeZone]]). 1. Return _result_. @@ -562,9 +563,15 @@

PartitionDateTimeRangePattern ( _dateTimeFormat_, _x_, _y_ )

1. If ! SameTemporalType(_x_, _y_) is *false*, throw a *TypeError* exception. 1. Let _x_ be ? HandleDateTimeValue(_dateTimeFormat_, _x_). 1. Let _y_ be ? HandleDateTimeValue(_dateTimeFormat_, _y_). + 1. If x.[[timeZone]] is not equal to y.[[timeZone]], then + 1. Throw a *RangeError* exception. + 1. Else if x.[[timeZone]] is not *undefined*, then + 1. Let _timeZone_ be x.[[timeZone]]. + 1. Else, + 1. Let _timeZone_ be _dateTimeFormat_.[[TimeZone]]. 1. If _x_.[[epochNanoseconds]] is greater than _y_.[[epochNanoseconds]], throw a *RangeError* exception. - 1. Let _tm1_ be ToLocalTime(_x_.[[epochNanoseconds]], _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). - 1. Let _tm2_ be ToLocalTime(_y_.[[epochNanoseconds]], _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). + 1. Let _tm1_ be ToLocalTime(_x_.[[epochNanoseconds]], _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]] _timeZone_). + 1. Let _tm2_ be ToLocalTime(_y_.[[epochNanoseconds]], _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]_timeZone_). 1. Let _rangePatterns_ be _dateTimeFormat_.[[RangePatterns]]_x_.[[rangePatterns]]. 1. Assert: _rangePatterns_ is equal to _y_.[[rangePatterns]]. 1. Let _rangePattern_ be *undefined*. @@ -610,7 +617,7 @@

PartitionDateTimeRangePattern ( _dateTimeFormat_, _x_, _y_ )

1. If _dateFieldsPracticallyEqual_ is *true*, then 1. Let _pattern_ be _dateTimeFormat_.[[Pattern]]_x_.[[pattern]]. 1. Let _patternParts_ be PartitionPattern(_pattern_). - 1. Let _result_ be ? FormatDateTimePattern(_dateTimeFormat_, _pattern_, _patternParts_, _x_.[[epochNanoseconds]], *undefined*). + 1. Let _result_ be ? FormatDateTimePattern(_dateTimeFormat_, _pattern_, _patternParts_, _x_.[[epochNanoseconds]], *undefined*, _timeZone_). 1. For each element _r_ in _result_, do 1. Set _r_.[[Source]] to *"shared"*. 1. Return _result_. @@ -625,7 +632,7 @@

PartitionDateTimeRangePattern ( _dateTimeFormat_, _x_, _y_ )

1. Else, 1. Let _z_ be _y_.[[epochNanoseconds]]. 1. Let _patternParts_ be PartitionPattern(_pattern_). - 1. Let _partResult_ be ? FormatDateTimePattern(_dateTimeFormat_, _pattern_, _patternParts_, _z_, _rangePattern_). + 1. Let _partResult_ be ? FormatDateTimePattern(_dateTimeFormat_, _pattern_, _patternParts_, _z_, _rangePattern_, _timeZone_). 1. For each element _r_ in _partResult_, do 1. Set _r_.[[Source]] to _source_. 1. Add all elements in _partResult_ to _result_ in order. @@ -770,7 +777,8 @@

HandleDateTimeTemporalDate ( _dateTimeFormat_, _temporalDate_ )

1. Return the Record { [[pattern]]: _pattern_.[[pattern]], [[rangePatterns]]: _pattern_.[[rangePatterns]], - [[epochNanoseconds]]: _instant_.[[Nanoseconds]] + [[epochNanoseconds]]: _instant_.[[Nanoseconds]], + [[timeZone]]: *undefined* }.
@@ -796,7 +804,8 @@

HandleDateTimeTemporalYearMonth ( _dateTimeFormat_, _temporalYearMonth_ ) @@ -823,7 +832,8 @@

HandleDateTimeTemporalMonthDay ( _dateTimeFormat_, _temporalMonthDay_ )

1. Return the Record { [[pattern]]: _pattern_.[[pattern]], [[rangePatterns]]: _pattern_.[[rangePatterns]], - [[epochNanoseconds]]: _instant_.[[Nanoseconds]] + [[epochNanoseconds]]: _instant_.[[Nanoseconds]], + [[timeZone]]: *undefined* }. @@ -848,7 +858,8 @@

HandleDateTimeTemporalTime ( _dateTimeFormat_, _temporalTime_ )

1. Return the Record { [[pattern]]: _pattern_.[[pattern]], [[rangePatterns]]: _pattern_.[[rangePatterns]], - [[epochNanoseconds]]: _instant_.[[Nanoseconds]] + [[epochNanoseconds]]: _instant_.[[Nanoseconds]], + [[timeZone]]: *undefined* }. @@ -874,7 +885,8 @@

HandleDateTimeTemporalDateTime ( _dateTimeFormat_, _dateTime_ )

1. Return the Record { [[pattern]]: _pattern_.[[pattern]], [[rangePatterns]]: _pattern_.[[rangePatterns]], - [[epochNanoseconds]]: _instant_.[[Nanoseconds]] + [[epochNanoseconds]]: _instant_.[[Nanoseconds]], + [[timeZone]]: *undefined* }. @@ -895,7 +907,8 @@

HandleDateTimeTemporalInstant ( _dateTimeFormat_, _instant_ )

1. Return the Record { [[pattern]]: _pattern_.[[pattern]], [[rangePatterns]]: _pattern_.[[rangePatterns]], - [[epochNanoseconds]]: _instant_.[[Nanoseconds]] + [[epochNanoseconds]]: _instant_.[[Nanoseconds]], + [[timeZone]]: *undefined* }. @@ -905,7 +918,7 @@

HandleDateTimeTemporalInstant ( _dateTimeFormat_, _instant_ )

HandleDateTimeTemporalZonedDateTime ( _dateTimeFormat_, _zonedDateTime_ )

- The abstract operation HandleDateTimeTemporalZonedDateTime accepts the arguments _dateTimeFormat_ (which must be an object initialized as a DateTimeFormat) and _zonedDateTime_ (which must be an ECMAScript value has an [[InitializedTemporalDateTime]] internal slot). It returns a record which contains the appropriate pattern and epochNanoseconds values for the input. This abstract operation functions as follows: + The abstract operation HandleDateTimeTemporalZonedDateTime accepts the arguments _dateTimeFormat_ (which must be an object initialized as a DateTimeFormat) and _zonedDateTime_ (which must be an ECMAScript value has an [[InitializedTemporalDateTime]] internal slot). It returns a record which contains the appropriate pattern, epochNanoseconds and timezone values for the input. This abstract operation functions as follows:

@@ -922,7 +935,8 @@

HandleDateTimeTemporalZonedDateTime ( _dateTimeFormat_, _zonedDateTime_ ) @@ -950,7 +964,8 @@

HandleDateTimeOthers ( _dateTimeFormat_, _x_ )

1. Return the Record { [[pattern]]: _pattern_, [[rangePatterns]]: _rangePatterns_, - [[epochNanoseconds]]: _epochNanoseconds_ + [[epochNanoseconds]]: _epochNanoseconds_, + [[timeZone]]: *undefined* }.