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
1. Let _nf3_ be ? Construct(%NumberFormat%, « _locale_, _nf3Options_ »).
382
391
1. Let _tm_ be ToLocalTime(<del>_x_</del><ins>_epochNanoseconds_</ins>, _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]).
383
392
1. Let _result_ be a new empty List.
384
393
1. Let _patternParts_ be PartitionPattern(<del>_dateTimeFormat_.[[Pattern]]</del><ins>_pattern_</ins>).
385
394
1. For each element _patternPart_ of _patternParts_, in List order, do
386
395
1. Let _p_ be _patternPart_.[[Type]].
387
396
1. If _p_ is *"literal"*, then
388
397
1. Append a new Record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]] } as the last element of the list _result_.
398
+
1. Else if _p_ is equal to *"fractionalSecondDigits"*, then
399
+
1. Let _v_ be _tm_.[[Millisecond]].
400
+
1. Let _v_ be floor(_v_ × 10<sup>( _fractionalSecondDigits_ - 3 )</sup>).
401
+
1. Let _fv_ be FormatNumeric(_nf3_, _v_).
402
+
1. Append a new Record { [[Type]]: *"fractionalSecond"*, [[Value]]: _fv_ } as the last element of _result_.
389
403
1. Else if _p_ matches a Property column of the row in <emu-xrefhref="#table-datetimeformat-components"></emu-xref>, then
390
404
1. Let _f_ be <del>the value of _dateTimeFormat_'s internal slot whose name is the Internal Slot column of the matching row</del><ins>_pattern_.[[<_p_>]]</ins>.
391
405
1. Let _v_ be the value of _tm_'s field whose name is the Internal Slot column of the matching row.
<del>`msFromTime(tz)` specified in ES2021's <emu-xrefhref="#sec-hours-minutes-second-and-milliseconds">Hours, Minutes, Second, and Milliseconds</emu-xref></del>
<li>[[NumberingSystem]] is a String value with the *"type"* given in Unicode Technical Standard 35 for the numbering system used for formatting.</li>
807
833
<li>[[TimeZone]] is a String value with the IANA time zone name of the time zone used for formatting.</li>
808
834
<li><del>[[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]] are each either *undefined*, indicating that the component is not used for formatting, or one of the String values given in <emu-xrefhref="#table-datetimeformat-components"></emu-xref>, indicating how the component should be presented in the formatted output.</del></li>
835
+
<li><del>[[FractionalSecondDigits]] is either *undefined* or a positive, non-negative integer Number value indicating the fraction digits to be used for fractional seconds. Numbers will be rounded or padded with trailing zeroes if necessary.</del></li>
809
836
<li><del>[[HourCycle]] is a String value indicating whether the 12-hour format (*"h11"*, *"h12"*) or the 24-hour format (*"h23"*, *"h24"*) should be used. *"h11"* and *"h23"* start with hour 0 and go up to 11 and 23 respectively. *"h12"* and *"h24"* start with hour 1 and go up to 12 and 24. [[HourCycle]] is only used when [[Hour]] is not *undefined*.</del></li>
810
837
<li>[[Pattern]]<ins>, [[TemporalPlainDatePattern]], [[TemporalPlainYearMonthPattern]], [[TemporalPlainMonthDayPattern]], [[TemporalPlainTimePattern]], [[TemporalPlainDateTimePattern]], [[TemporalInstantPattern]], and [[TemporalZonedDateTimePattern]] are</ins> <del>is a String value</del><ins>records containing at least a [[pattern]] field</ins> as described in <emu-xrefhref="#sec-intl.datetimeformat-internal-slots"></emu-xref>.</li>
0 commit comments