+ <emu-alg><ol><li>Let <var>dateTimeFormat</var> be ? <emu-xref aoid="OrdinaryCreateFromConstructor"><a href="https://tc39.es/ecma262/#sec-ordinarycreatefromconstructor">OrdinaryCreateFromConstructor</a></emu-xref>(<var>newTarget</var>, <emu-val>"%Intl.DateTimeFormat.prototype%"</emu-val>, « <var class="field">[[InitializedDateTimeFormat]]</var>, <var class="field">[[Locale]]</var>, <var class="field">[[Calendar]]</var>, <var class="field">[[NumberingSystem]]</var>, <var class="field">[[TimeZone]]</var>, <var class="field">[[HourCycle]]</var>, <var class="field">[[DateStyle]]</var>, <var class="field">[[TimeStyle]]</var>, <var class="field">[[DateTimeFormat]]</var>, <var class="field">[[BoundFormat]]</var> »).</li><li>Let <var>hour12</var> be <emu-val>undefined</emu-val>.</li><li>Let <var>modifyResolutionOptions</var> be a new <emu-xref href="#sec-abstract-closure"><a href="https://tc39.es/ecma262/#sec-abstract-closure">Abstract Closure</a></emu-xref> with parameters (<var>options</var>) that captures <var>hour12</var> and performs the following steps when called:<ol><li>Set <var>hour12</var> to <var>options</var>.<var class="field">[[hour12]]</var>.</li><li>Remove field <var class="field">[[hour12]]</var> from <var>options</var>.</li><li>If <var>hour12</var> is not <emu-val>undefined</emu-val>, set <var>options</var>.<var class="field">[[hc]]</var> to <emu-val>null</emu-val>.</li></ol></li><li>Let <var>optionsResolution</var> be ? <emu-xref aoid="ResolveOptions"><a href="https://tc39.es/ecma402/#sec-resolveoptions">ResolveOptions</a></emu-xref>(<emu-xref href="#sec-intl-datetimeformat-constructor"><a href="https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor">%Intl.DateTimeFormat%</a></emu-xref>, <emu-xref href="#sec-intl-datetimeformat-constructor"><a href="https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor">%Intl.DateTimeFormat%</a></emu-xref>.<var class="field">[[LocaleData]]</var>, <var>locales</var>, <var>options</var>, « <emu-const>coerce-options</emu-const> », <var>modifyResolutionOptions</var>).</li><li>Set <var>options</var> to <var>optionsResolution</var>.<var class="field">[[Options]]</var>.</li><li>Let <var>r</var> be <var>optionsResolution</var>.<var class="field">[[ResolvedLocale]]</var>.</li><li>Set <var>dateTimeFormat</var>.<var class="field">[[Locale]]</var> to <var>r</var>.<var class="field">[[Locale]]</var>.</li><li>Let <var>resolvedCalendar</var> be <var>r</var>.<var class="field">[[ca]]</var>.</li><li><ins>If <var>resolvedCalendar</var> is <emu-val>"islamic"</emu-val> or <emu-val>"islamic-rgsa"</emu-val>, then</ins><ol><li><ins>Let <var>fallbackCalendar</var> be an implementation- and locale-defined <emu-xref href="#sec-ecma402-calendar-types" id="_ref_13"><a href="#sec-ecma402-calendar-types">calendar type</a></emu-xref> that is one of the values returned from <emu-xref aoid="AvailableCalendars" id="_ref_14"><a href="#sup-availablecalendars">AvailableCalendars</a></emu-xref>.</ins></li><li><ins>Set <var>resolvedCalendar</var> to <emu-xref aoid="CanonicalizeUValue"><a href="https://tc39.es/ecma402/#sec-canonicalizeuvalue">CanonicalizeUValue</a></emu-xref>(<emu-val>"ca"</emu-val>, <var>fallbackCalendar</var>).</ins></li><li><ins>If the ECMAScript implementation has a mechanism for reporting diagnostic warning messages, a warning should be issued.</ins></li></ol></li><li>Set <var>dateTimeFormat</var>.<var class="field">[[Calendar]]</var> to <var>resolvedCalendar</var>.</li><li>NOTE: Rest of algorithm unchanged.</li></ol></emu-alg>
0 commit comments