@@ -130,16 +130,7 @@ <h1>
130130 1. Set _dateTimeFormat_ .[[DateStyle]] to _dateStyle_ .
131131 1. Let _timeStyle_ be ? GetOption(_options_ , *"timeStyle"* , ~string~ , « ; *"full"* , *"long"* , *"medium"* , *"short"* » ; , *undefined* ).
132132 1. Set _dateTimeFormat_ .[[TimeStyle]] to _timeStyle_ .
133- 1. If _dateStyle_ is not *undefined* or _timeStyle_ is not *undefined* , then
134- 1. If _hasExplicitFormatComponents_ is *true* , then
135- 1. Throw a *TypeError* exception.
136- 1. If _required_ is ~date~ and _timeStyle_ is not *undefined* , then
137- 1. Throw a *TypeError* exception.
138- 1. If _required_ is ~time~ and _dateStyle_ is not *undefined* , then
139- 1. Throw a *TypeError* exception.
140- 1. Let _styles_ be _resolvedLocaleData_ .[[styles]].[[< ; _resolvedCalendar_ > ; ]].
141- 1. Let _bestFormat_ be DateTimeStyleFormat(_dateStyle_ , _timeStyle_ , _styles_ ).
142- 1. Else,
133+ 1. If _dateStyle_ is *undefined* and _timeStyle_ is *undefined* , then
143134 1. Let _needDefaults_ be *true* .
144135 1. If _required_ is ~date~ or ~any~ , then
145136 1. For each property name _prop_ of « ; *"weekday"* , *"year"* , *"month"* , *"day"* » ; , do
@@ -160,6 +151,15 @@ <h1>
160151 1. Let _bestFormat_ be BasicFormatMatcher(_formatOptions_ , _formats_ ).
161152 1. Else,
162153 1. Let _bestFormat_ be BestFitFormatMatcher(_formatOptions_ , _formats_ ).
154+ 1. Else,
155+ 1. If _hasExplicitFormatComponents_ is *true* , then
156+ 1. Throw a *TypeError* exception.
157+ 1. If _required_ is ~date~ and _timeStyle_ is not *undefined* , then
158+ 1. Throw a *TypeError* exception.
159+ 1. If _required_ is ~time~ and _dateStyle_ is not *undefined* , then
160+ 1. Throw a *TypeError* exception.
161+ 1. Let _styles_ be _resolvedLocaleData_ .[[styles]].[[< ; _resolvedCalendar_ > ; ]].
162+ 1. Let _bestFormat_ be DateTimeStyleFormat(_dateStyle_ , _timeStyle_ , _styles_ ).
163163 1. For each row of <emu-xref href =" #table-datetimeformat-components" ></emu-xref >, except the header row, in table order, do
164164 1. Let _prop_ be the name given in the Property column of the current row.
165165 1. If _bestFormat_ has a field [[< ; _prop_ > ; ]], then
0 commit comments