diff --git a/spec/intl.html b/spec/intl.html index 3dbb8f5fc..9dff080cf 100644 --- a/spec/intl.html +++ b/spec/intl.html @@ -730,14 +730,18 @@

It interprets _x_ as a time value as specified in es2024, an epoch time, and creates the corresponding parts according to the type of _x_, effective locale, and the formatting options of _dateTimeFormat_.
+ 1. Let _x_ be TimeClip(_x_). + 1. If _x_ is *NaN*, throw a *RangeError* exception. + 1. Let _epochNanoseconds_ be ℤ(ℝ(_x_) × 106). 1. Let _format_ be _dateTimeFormat_.[[DateTimeFormat]]. - 1. Let _xFormatRecord_ be ? HandleDateTimeValue(_dateTimeFormat_, _x_). - 1. Let _format_ be _xFormatRecord_.[[Format]]. + 1. Let _formatRecord_ be ? HandleDateTimeValue(_dateTimeFormat_, _x_). + 1. Let _epochNanoseconds_ be _formatRecord_.[[EpochNanoseconds]]. + 1. Let _format_ be _formatRecord_.[[Format]]. 1. If _format_ has a field [[hour]] and _dateTimeFormat_.[[HourCycle]] is *"h11"* or *"h12"*, then 1. Let _pattern_ be _format_.[[pattern12]]. 1. Else, 1. Let _pattern_ be _format_.[[pattern]]. - 1. Let _result_ be ? FormatDateTimePattern(_dateTimeFormat_, _format_, _pattern_, _x__xFormatRecord_.[[EpochNanoseconds]]). + 1. Let _result_ be FormatDateTimePattern(_dateTimeFormat_, _format_, _pattern_, _epochNanoseconds_). 1. Return _result_. @@ -800,12 +804,16 @@

1. If _x_ is *NaN*, throw a *RangeError* exception. 1. Let _y_ be TimeClip(_y_). 1. If _y_ is *NaN*, throw a *RangeError* exception. + 1. Let _xEpochNanoseconds_ be ℤ(ℝ(_x_) × 106). + 1. Let _yEpochNanoseconds_ be ℤ(ℝ(_y_) × 106). 1. If IsTemporalObject(_x_) is *true* or IsTemporalObject(_y_) is *true*, then 1. If SameTemporalType(_x_, _y_) is *false*, throw a *TypeError* exception. 1. Let _xFormatRecord_ be ? HandleDateTimeValue(_dateTimeFormat_, _x_). 1. Let _yFormatRecord_ be ? HandleDateTimeValue(_dateTimeFormat_, _y_). - 1. Let _tm1_ be ToLocalTime(ℤ(ℝ(_x_) × 106)_xFormatRecord_.[[EpochNanoseconds]], _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). - 1. Let _tm2_ be ToLocalTime(ℤ(ℝ(_y_) × 106)_yFormatRecord_.[[EpochNanoseconds]], _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). + 1. Let _xEpochNanoseconds_ be _xFormatRecord_.[[EpochNanoseconds]]. + 1. Let _yEpochNanoseconds_ be _yFormatRecord_.[[EpochNanoseconds]]. + 1. Let _tm1_ be ToLocalTime(_xEpochNanoseconds_, _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). + 1. Let _tm2_ be ToLocalTime(_yEpochNanoseconds_, _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]). 1. Let _format_ be _dateTimeFormat_.[[DateTimeFormat]]. 1. Let _format_ be _xFormatRecord_.[[Format]]. 1. Assert: _format_ is equal to _yFormatRecord_.[[Format]]. @@ -846,7 +854,7 @@

1. Set _relevantFieldsEqual_ to *false*. 1. If _relevantFieldsEqual_ is *true*, then 1. Let _collapsedResult_ be a new empty List. - 1. Let _resultParts_ be ! FormatDateTimePattern(_dateTimeFormat_, _format_, _pattern_, _x_). + 1. Let _resultParts_ be FormatDateTimePattern(_dateTimeFormat_, _format_, _pattern_, _x_). 1. For each Record { [[Type]], [[Value]] } _r_ of _resultParts_, do 1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: *"shared"* } to _collapsedResult_. 1. Return _collapsedResult_. @@ -860,7 +868,7 @@

1. Let _z_ be _x_. 1. Else, 1. Let _z_ be _y_. - 1. Let _resultParts_ be ! FormatDateTimePattern(_dateTimeFormat_, _selectedRangePattern_, _pattern_, _z_). + 1. Let _resultParts_ be FormatDateTimePattern(_dateTimeFormat_, _selectedRangePattern_, _pattern_, _z_). 1. For each Record { [[Type]], [[Value]] } _r_ of _resultParts_, do 1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: _source_ } to _rangeResult_. 1. Return _rangeResult_.