Skip to content

Commit 3f029b0

Browse files
anbaben-allen
authored andcommitted
Editorial: Fix various rebase errors
1 parent 53e7478 commit 3f029b0

8 files changed

+65
-57
lines changed

spec/datetimeformat.html

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ <h1>
6060
</dl>
6161

6262
<emu-alg>
63-
1. Let _dateTimeFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%DateTimeFormat.prototype%"*, &laquo; [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[HourCycle]], [[DateStyle]], [[TimeStyle]], [[DateTimeFormat]], [[BoundFormat]] &raquo;).
63+
1. Let _dateTimeFormat_ be ? OrdinaryCreateFromConstructor(_newTarget_, *"%Intl.DateTimeFormat.prototype%"*, &laquo; [[InitializedDateTimeFormat]], [[Locale]], [[Calendar]], [[NumberingSystem]], [[TimeZone]], [[HourCycle]], [[DateStyle]], [[TimeStyle]], [[DateTimeFormat]], [[BoundFormat]] &raquo;).
6464
1. Let _requestedLocales_ be ? CanonicalizeLocaleList(_locales_).
6565
1. Set _options_ to ? CoerceOptionsToObject(_options_).
6666
1. Let _opt_ be a new Record.
@@ -129,7 +129,16 @@ <h1>
129129
1. Set _dateTimeFormat_.[[DateStyle]] to _dateStyle_.
130130
1. Let _timeStyle_ be ? GetOption(_options_, *"timeStyle"*, ~string~, &laquo; *"full"*, *"long"*, *"medium"*, *"short"* &raquo;, *undefined*).
131131
1. Set _dateTimeFormat_.[[TimeStyle]] to _timeStyle_.
132-
1. If _dateStyle_ is *undefined* and _timeStyle_ is *undefined*, then
132+
1. If _dateStyle_ is not *undefined* or _timeStyle_ is not *undefined*, then
133+
1. If _hasExplicitFormatComponents_ is *true*, then
134+
1. Throw a *TypeError* exception.
135+
1. If _required_ is ~date~ and _timeStyle_ is not *undefined*, then
136+
1. Throw a *TypeError* exception.
137+
1. If _required_ is ~time~ and _dateStyle_ is not *undefined*, then
138+
1. Throw a *TypeError* exception.
139+
1. Let _styles_ be _resolvedLocaleData_.[[styles]].[[&lt;_resolvedCalendar_&gt;]].
140+
1. Let _bestFormat_ be DateTimeStyleFormat(_dateStyle_, _timeStyle_, _styles_).
141+
1. Else,
133142
1. Let _needDefaults_ be *true*.
134143
1. If _required_ is ~date~ or ~any~, then
135144
1. For each property name _prop_ of &laquo; *"weekday"*, *"year"*, *"month"*, *"day"* &raquo;, do
@@ -150,7 +159,7 @@ <h1>
150159
1. Let _bestFormat_ be BasicFormatMatcher(_formatOptions_, _formats_).
151160
1. Else,
152161
1. Let _bestFormat_ be BestFitFormatMatcher(_formatOptions_, _formats_).
153-
1. Set _dateTimeFormat_.[[Patterns]] to _bestFormat_.
162+
1. Set _dateTimeFormat_.[[DateTimeFormat]] to _bestFormat_.
154163
1. If _bestFormat_ has a field [[hour]], then
155164
1. Set _dateTimeFormat_.[[HourCycle]] to _hc_.
156165
1. Return _dateTimeFormat_.
@@ -247,7 +256,7 @@ <h1>Internal slots</h1>
247256
[[LocaleData]].[[&lt;_locale_&gt;]].[[hourCycle24]] must be one of the String values *"h23"* or *"h24"*.
248257
</li>
249258
<li>
250-
[[LocaleData]].[[&lt;_locale_&gt;]] must have a [[formats]] field. The value of this [[formats]] field must be a Record with a [[&lt;_calendar_&gt;]] field for each calendar value _calendar_. The value of each [[&lt;_calendar_&gt;]] field must be a List of DateTimeFormat Patterns Record. Multiple Records in such a List may use the same subset of the fields as long as the corresponding values differ for at least one field. The following subsets must be available for each locale:
259+
[[LocaleData]].[[&lt;_locale_&gt;]] must have a [[formats]] field. The value of this [[formats]] field must be a Record with a [[&lt;_calendar_&gt;]] field for each calendar value _calendar_. The value of each [[&lt;_calendar_&gt;]] field must be a List of DateTime Format Records. Multiple Records in such a List may use the same subset of the fields as long as the corresponding values differ for at least one field. The following subsets must be available for each locale:
251260
<ul>
252261
<li>weekday, year, month, day, hour, minute, second, fractionalSecondDigits</li>
253262
<li>weekday, year, month, day, hour, minute, second</li>
@@ -264,18 +273,18 @@ <h1>Internal slots</h1>
264273
</ul>
265274
</li>
266275
<li>
267-
[[LocaleData]].[[&lt;_locale_&gt;]] must have a [[styles]] field. The value of this [[styles]] field must be a Record with a [[&lt;_calendar_&gt;]] field for each calendar value _calendar_. The value of each [[&lt;_calendar_&gt;]] field must be a DateTimeFormat Styles Record.
276+
[[LocaleData]].[[&lt;_locale_&gt;]] must have a [[styles]] field. The value of this [[styles]] field must be a Record with a [[&lt;_calendar_&gt;]] field for each calendar value _calendar_. The value of each [[&lt;_calendar_&gt;]] field must be a DateTime Styles Record.
268277
</li>
269278
</ul>
270279

271-
<emu-clause id="sec-datetimeformat-patterns-record">
272-
<h1>DateTimeFormat Patterns Records</h1>
280+
<emu-clause id="sec-datetimeformat-format-record">
281+
<h1>DateTime Format Records</h1>
273282

274283
<p>
275-
Each <dfn id="datetimeformat-patterns-record" variants="DateTimeFormat Patterns Records">DateTimeFormat Patterns Record</dfn> has the fields defined in <emu-xref href="#table-datetimeformat-patterns-record"></emu-xref>.
284+
Each <dfn id="datetimeformat-format-record" variants="DateTime Format Records">DateTime Format Record</dfn> has the fields defined in <emu-xref href="#table-datetimeformat-format-record"></emu-xref>.
276285
</p>
277-
<emu-table id="table-datetimeformat-patterns-record">
278-
<emu-caption>DateTimeFormat Patterns Record</emu-caption>
286+
<emu-table id="table-datetimeformat-format-record">
287+
<emu-caption>DateTime Format Record</emu-caption>
279288
<table class="real-table">
280289
<thead>
281290
<tr>
@@ -548,14 +557,14 @@ <h1>DateTime Range Pattern Part Records</h1>
548557
</emu-table>
549558
</emu-clause>
550559

551-
<emu-clause id="sec-datetimeformat-calendar-style-record">
552-
<h1>DateTime Calendar Style Records</h1>
560+
<emu-clause id="sec-datetimeformat-styles-record">
561+
<h1>DateTime Styles Records</h1>
553562

554563
<p>
555-
Each <dfn id="datetimeformat-calendar-style-record">DateTime Calendar Style Record</dfn> has the fields defined in <emu-xref href="#table-datetimeformat-calendar-style-record"></emu-xref>.
564+
Each <dfn id="datetimeformat-styles-record">DateTime Styles Record</dfn> has the fields defined in <emu-xref href="#table-datetimeformat-styles-record"></emu-xref>.
556565
</p>
557-
<emu-table id="table-datetimeformat-calendar-style-record">
558-
<emu-caption>DateTime Calendar Style Record</emu-caption>
566+
<emu-table id="table-datetimeformat-styles-record">
567+
<emu-caption>DateTime Styles Record</emu-caption>
559568
<table class="real-table">
560569
<thead>
561570
<tr>
@@ -564,15 +573,15 @@ <h1>DateTime Calendar Style Records</h1>
564573
</tr>
565574
</thead>
566575
<tr>
567-
<td>[[DateFormat]]</td>
576+
<td>[[Date]]</td>
568577
<td>a DateTime Style Record</td>
569578
</tr>
570579
<tr>
571-
<td>[[TimeFormat]]</td>
580+
<td>[[Time]]</td>
572581
<td>a DateTime Style Record</td>
573582
</tr>
574583
<tr>
575-
<td>[[DateTimeFormat]]</td>
584+
<td>[[Connector]]</td>
576585
<td>a DateTime Connector Record</td>
577586
</tr>
578587
<tr>
@@ -1241,7 +1250,7 @@ <h1>
12411250
DateTimeStyleFormat (
12421251
_dateStyle_: *"full"*, *"long"*, *"medium"*, *"short"*, or *undefined*,
12431252
_timeStyle_: *"full"*, *"long"*, *"medium"*, *"short"*, or *undefined*,
1244-
_styles_: a DateTime Calendar Style Record,
1253+
_styles_: a DateTime Styles Record,
12451254
): a DateTime Format Record
12461255
</h1>
12471256
<dl class="header">
@@ -1252,15 +1261,15 @@ <h1>
12521261
1. Assert: _dateStyle_ is not *undefined* or _timeStyle_ is not *undefined*.
12531262
1. If _timeStyle_ is not *undefined*, then
12541263
1. Assert: _timeStyle_ is one of *"full"*, *"long"*, *"medium"*, or *"short"*.
1255-
1. Let _timeFormat_ be _styles_.[[TimeFormat]].[[&lt;_timeStyle_&gt;]].
1264+
1. Let _timeFormat_ be _styles_.[[Time]].[[&lt;_timeStyle_&gt;]].
12561265
1. If _dateStyle_ is not *undefined*, then
12571266
1. Assert: _dateStyle_ is one of *"full"*, *"long"*, *"medium"*, or *"short"*.
1258-
1. Let _dateFormat_ be _styles_.[[DateFormat]].[[&lt;_dateStyle_&gt;]].
1267+
1. Let _dateFormat_ be _styles_.[[Date]].[[&lt;_dateStyle_&gt;]].
12591268
1. If _dateStyle_ is not *undefined* and _timeStyle_ is not *undefined*, then
12601269
1. Let _format_ be a new DateTime Format Record.
12611270
1. Add to _format_ all fields from _dateFormat_ except [[pattern]] and [[rangePatterns]].
12621271
1. Add to _format_ all fields from _timeFormat_ except [[pattern]], [[rangePatterns]], [[pattern12]], and [[rangePatterns12]], if present.
1263-
1. Let _connector_ be _styles_.[[DateTimeFormat]].[[&lt;_dateStyle_&gt;]].
1272+
1. Let _connector_ be _styles_.[[Connector]].[[&lt;_dateStyle_&gt;]].
12641273
1. Let _pattern_ be the string _connector_ with the substring *"{0}"* replaced with _timeFormat_.[[pattern]] and the substring *"{1}"* replaced with _dateFormat_.[[pattern]].
12651274
1. Set _format_.[[pattern]] to _pattern_.
12661275
1. If _timeFormat_ has a [[pattern12]] field, then
@@ -1403,31 +1412,31 @@ <h1>
14031412
1. Perform ! CreateDataPropertyOrThrow(_nf2Options_, *"minimumIntegerDigits"*, *2*<sub>𝔽</sub>).
14041413
1. Perform ! CreateDataPropertyOrThrow(_nf2Options_, *"useGrouping"*, *false*).
14051414
1. Let _nf2_ be ! Construct(%Intl.NumberFormat%, &laquo; _locale_, _nf2Options_ &raquo;).
1406-
1. Let _fractionalSecondDigits_ be _dateTimeFormat_.[[FractionalSecondDigits]].
1407-
1. If _fractionalSecondDigits_ is *undefined*, set _fractionalSecondDigits_ to 1.
1408-
1. Let _nf3Options_ be OrdinaryObjectCreate(*null*).
1409-
1. Perform ! CreateDataPropertyOrThrow(_nf3Options_, *"minimumIntegerDigits"*, 𝔽(_fractionalSecondDigits_)).
1410-
1. Perform ! CreateDataPropertyOrThrow(_nf3Options_, *"useGrouping"*, *false*).
1411-
1. Let _nf3_ be ! Construct(%NumberFormat%, &laquo; _locale_, _nf3Options_ &raquo;).
1415+
1. If _format_ has a field [[fractionalSecondDigits]], then
1416+
1. Let _fractionalSecondDigits_ be _format_.[[fractionalSecondDigits]].
1417+
1. Let _nf3Options_ be OrdinaryObjectCreate(*null*).
1418+
1. Perform ! CreateDataPropertyOrThrow(_nf3Options_, *"minimumIntegerDigits"*, 𝔽(_fractionalSecondDigits_)).
1419+
1. Perform ! CreateDataPropertyOrThrow(_nf3Options_, *"useGrouping"*, *false*).
1420+
1. Let _nf3_ be ! Construct(%Intl.NumberFormat%, &laquo; _locale_, _nf3Options_ &raquo;).
14121421
1. Let _tm_ be ToLocalTime(ℤ(ℝ(_x_) &times; 10<sup>6</sup>), _dateTimeFormat_.[[Calendar]], _dateTimeFormat_.[[TimeZone]]).
14131422
1. Let _patternParts_ be PartitionPattern(_pattern_).
14141423
1. Let _result_ be a new empty List.
14151424
1. For each Record { [[Type]], [[Value]] } _patternPart_ of _patternParts_, do
14161425
1. Let _p_ be _patternPart_.[[Type]].
14171426
1. If _p_ is *"literal"*, then
14181427
1. Append the Record { [[Type]]: *"literal"*, [[Value]]: _patternPart_.[[Value]] } to _result_.
1419-
1. Else if _p_ is equal to *"fractionalSecondDigits"*, then
1428+
1. Else if _p_ is *"fractionalSecondDigits"*, then
14201429
1. Assert: _format_ has a field [[fractionalSecondDigits]].
14211430
1. Let _v_ be _tm_.[[Millisecond]].
14221431
1. Set _v_ to floor(_v_ &times; 10<sup>( _fractionalSecondDigits_ - 3 )</sup>).
14231432
1. Let _fv_ be FormatNumeric(_nf3_, _v_).
14241433
1. Append the Record { [[Type]]: *"fractionalSecond"*, [[Value]]: _fv_ } to _result_.
1425-
1. Else if _p_ is equal to *"dayPeriod"*, then
1434+
1. Else if _p_ is *"dayPeriod"*, then
14261435
1. Assert: _format_ has a field [[dayPeriod]].
14271436
1. Let _f_ be _format_.[[dayPeriod]].
14281437
1. Let _fv_ be a String value representing the day period of _tm_ in the form given by _f_; the String value depends upon the implementation and the effective locale of _dateTimeFormat_.
14291438
1. Append the Record { [[Type]]: _p_, [[Value]]: _fv_ } to _result_.
1430-
1. Else if _p_ is equal to *"timeZoneName"*, then
1439+
1. Else if _p_ is *"timeZoneName"*, then
14311440
1. Assert: _format_ has a field [[timeZoneName]].
14321441
1. Let _f_ be _format_.[[timeZoneName]].
14331442
1. Let _v_ be _dateTimeFormat_.[[TimeZone]].
@@ -1468,7 +1477,7 @@ <h1>
14681477
1. Let _v_ be _tm_.[[RelatedYear]].
14691478
1. Let _fv_ be FormatNumeric(_nf_, _v_).
14701479
1. Append the Record { [[Type]]: *"relatedYear"*, [[Value]]: _fv_ } to _result_.
1471-
1. Else if _p_ is equal to *"yearName"*, then
1480+
1. Else if _p_ is *"yearName"*, then
14721481
1. Let _v_ be _tm_.[[YearName]].
14731482
1. Let _fv_ be an implementation and locale dependent String value representing _v_.
14741483
1. Append the Record { [[Type]]: *"yearName"*, [[Value]]: _fv_ } to _result_.
@@ -1590,9 +1599,10 @@ <h1>
15901599
1. Let _v1_ be a String value representing the day period of _tm1_; the String value depends upon the implementation and the effective locale of _dateTimeFormat_.
15911600
1. Let _v2_ be a String value representing the day period of _tm2_; the String value depends upon the implementation and the effective locale of _dateTimeFormat_.
15921601
1. Else if _fieldName_ is [[FractionalSecondDigits]], then
1593-
1. Let _fractionalSecondDigits_ be _dateTimeFormat_.[[FractionalSecondDigits]].
1594-
1. If _fractionalSecondDigits_ is *undefined*, then
1595-
1. Set _fractionalSecondDigits_ to 3.
1602+
1. If _format_ has a [[fractionalSecondDigits]] field, then
1603+
1. Let _fractionalSecondDigits_ be _format_.[[fractionalSecondDigits]].
1604+
1. Else,
1605+
1. Let _fractionalSecondDigits_ be 3.
15961606
1. Let _exp_ be _fractionalSecondDigits_ - 3.
15971607
1. Let _v1_ be floor(_tm1_.[[Millisecond]] &times; 10<sup>_exp_</sup>).
15981608
1. Let _v2_ be floor(_tm2_.[[Millisecond]] &times; 10<sup>_exp_</sup>).
@@ -1604,7 +1614,7 @@ <h1>
16041614
1. If _relevantFieldsEqual_ is *true*, then
16051615
1. Let _collapsedResult_ be a new empty List.
16061616
1. Let _resultParts_ be ! FormatDateTimePattern(_dateTimeFormat_, _format_, _pattern_, _x_).
1607-
1. For each Record { [[Type]], [[Value]] } _r_ in _resultParts_, do
1617+
1. For each Record { [[Type]], [[Value]] } _r_ of _resultParts_, do
16081618
1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: *"shared"* } to _collapsedResult_.
16091619
1. Return _collapsedResult_.
16101620
1. Let _rangeResult_ be a new empty List.
@@ -1618,7 +1628,7 @@ <h1>
16181628
1. Else,
16191629
1. Let _z_ be _y_.
16201630
1. Let _resultParts_ be ! FormatDateTimePattern(_dateTimeFormat_, _selectedRangePattern_, _pattern_, _z_).
1621-
1. For each Record { [[Type]], [[Value]] } _r_ in _resultParts_, do
1631+
1. For each Record { [[Type]], [[Value]] } _r_ of _resultParts_, do
16221632
1. Append the Record { [[Type]]: _r_.[[Type]], [[Value]]: _r_.[[Value]], [[Source]]: _source_ } to _rangeResult_.
16231633
1. Return _rangeResult_.
16241634
</emu-alg>

spec/listformat.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ <h1>
338338
</dl>
339339
<emu-alg>
340340
1. Let _parts_ be CreatePartsFromList(_listFormat_, _list_).
341-
1. Let _result_ be an empty String.
341+
1. Let _result_ be the empty String.
342342
1. For each Record { [[Type]], [[Value]] } _part_ of _parts_, do
343343
1. Set _result_ to the string-concatenation of _result_ and _part_.[[Value]].
344344
1. Return _result_.

spec/locale-sensitive-functions.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ <h1>
8383
1. Let _requestedLocale_ be _requestedLocales_[0].
8484
1. Else,
8585
1. Let _requestedLocale_ be DefaultLocale().
86-
1. Let _noExtensionsLocale_ be the String value that is _requestedLocale_ with any Unicode locale extension sequences removed.
8786
1. Let _availableLocales_ be an Available Locales List which includes the language tags for which the Unicode Character Database contains language-sensitive case mappings. If the implementation supports additional locale-sensitive case mappings, _availableLocales_ should also include their corresponding language tags.
88-
1. Let _match_ be LookupMatchingLocaleByPrefix(_availableLocales_, _noExtensionsLocale_).
87+
1. Let _match_ be LookupMatchingLocaleByPrefix(_availableLocales_, &laquo; _requestedLocale_ &raquo;).
8988
1. If _match_ is not *undefined*, let _locale_ be _match_.[[locale]]; else let _locale_ be *"und"*.
9089
1. Let _codePoints_ be StringToCodePoints(_S_).
9190
1. If _targetCase_ is ~lower~, then

spec/locales-currencies-tz.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ <h1>AvailableNamedTimeZoneIdentifiers ( ): a List of Time Zone Identifier Record
212212
Its result describes all available named time zone identifiers in this implementation, as well as the primary time zone identifier corresponding to each available named time zone identifier.
213213
The List is ordered according to the [[Identifier]] field of each Time Zone Identifier Record.
214214
</dd>
215-
<dt>redefinition</dt>
216-
<dd>true</dd>
217215
</dl>
218216
<p>This definition supersedes the definition provided in <emu-xref href="#sec-availablenamedtimezoneidentifiers"></emu-xref>.</p>
219217
<emu-alg>

spec/negotiation.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ <h1>
7373
1. Let _canonicalizedTag_ be CanonicalizeUnicodeLocaleId(_tag_).
7474
1. If _seen_ does not contain _canonicalizedTag_, append _canonicalizedTag_ to _seen_.
7575
1. Set _k_ to _k_ + 1.
76+
1. Return _seen_.
7677
</emu-alg>
7778

7879
<emu-note>
@@ -283,7 +284,7 @@ <h1>
283284
1. If _supportedKeywords_ is not empty, then
284285
1. Let _supportedAttributes_ be a new empty List.
285286
1. Set _foundLocale_ to InsertUnicodeExtensionAndCanonicalize(_foundLocale_, _supportedAttributes_, _supportedKeywords_).
286-
1. Set _result_.[[locale]] to _foundLocale_.
287+
1. Set _result_.[[Locale]] to _foundLocale_.
287288
1. Return _result_.
288289
</emu-alg>
289290
</emu-clause>
@@ -305,11 +306,10 @@ <h1>
305306
1. Let _matcher_ be ? GetOption(_options_, *"localeMatcher"*, ~string~, &laquo; *"lookup"*, *"best fit"* &raquo;, *"best fit"*).
306307
1. Let _subset_ be a new empty List.
307308
1. For each element _locale_ of _requestedLocales_, do
308-
1. Let _noExtensionsLocale_ be the String value that is _locale_ with any Unicode locale extension sequences removed.
309309
1. If _matcher_ is *"lookup"*, then
310-
1. Let _match_ be LookupMatchingLocaleByPrefix(_availableLocales_, _noExtensionsLocale_).
310+
1. Let _match_ be LookupMatchingLocaleByPrefix(_availableLocales_, &laquo; _locale_ &raquo;).
311311
1. Else,
312-
1. Let _match_ be LookupMatchingLocaleByBestFit(_availableLocales_, _noExtensionsLocale_).
312+
1. Let _match_ be LookupMatchingLocaleByBestFit(_availableLocales_, &laquo; _locale_ &raquo;).
313313
1. If _match_ is not *undefined*, append _locale_ to _subset_.
314314
1. Return CreateArrayFromList(_subset_).
315315
</emu-alg>

0 commit comments

Comments
 (0)