Skip to content

Commit 6cfea51

Browse files
committed
According to implementation-defined processing
Sounds better than from an implementation-defined processing, and is already used elsewhere.
1 parent 7c268f6 commit 6cfea51

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4391,14 +4391,14 @@ <h1><span class="secnum">4.1.4</span> IsValidEraYearForCalendar ( <var>calendar<
43914391
<emu-clause id="sec-temporal-calendardateera" type="abstract operation" aoid="CalendarDateEra">
43924392
<h1><span class="secnum">4.1.5</span> CalendarDateEra ( <var>calendar</var>, <var>date</var> )</h1>
43934393
<p>The abstract operation CalendarDateEra takes arguments <var>calendar</var> (a <emu-xref href="#sec-ecma402-calendar-types" id="_ref_20"><a href="#sec-ecma402-calendar-types">calendar type</a></emu-xref> that is not <emu-val>"iso8601"</emu-val>) and <var>date</var> (a Temporal.PlainDateTime, Temporal.PlainDate, or Temporal.PlainYearMonth) and returns a String or <emu-val>undefined</emu-val>. It performs <emu-xref href="#implementation-defined"><a href="https://tc39.es/ecma262/#implementation-defined">implementation-defined</a></emu-xref> processing to find the era for the date corresponding to <var>date</var> in the context of the calendar represented by <var>calendar</var> and returns a lowercase String value representing that era, or <emu-val>undefined</emu-val> for calendars that do not have eras. It performs the following steps when called:</p>
4394-
<emu-alg><ol><li>If <emu-xref aoid="CalendarSupportsEra" id="_ref_21"><a href="#sec-temporal-calendarsupportsera">CalendarSupportsEra</a></emu-xref>(<var>calendar</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>era</var> be the String to indicate the era corresponding to <var>date</var> in the context of the calendar represented by <var>calendar</var> from an <emu-xref href="#implementation-defined"><a href="https://tc39.es/ecma262/#implementation-defined">implementation-defined</a></emu-xref> processing.</li><li>Return <emu-xref aoid="CanonicalizeEraInCalendar" id="_ref_22"><a href="#sec-temporal-canonicalizeeraincalendar">CanonicalizeEraInCalendar</a></emu-xref>(<var>calendar</var>, <var>era</var>).</li></ol></emu-alg>
4394+
<emu-alg><ol><li>If <emu-xref aoid="CalendarSupportsEra" id="_ref_21"><a href="#sec-temporal-calendarsupportsera">CalendarSupportsEra</a></emu-xref>(<var>calendar</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>era</var> be the String to indicate the era corresponding to <var>date</var> in the context of the calendar represented by <var>calendar</var> according to <emu-xref href="#implementation-defined"><a href="https://tc39.es/ecma262/#implementation-defined">implementation-defined</a></emu-xref> processing.</li><li>Return <emu-xref aoid="CanonicalizeEraInCalendar" id="_ref_22"><a href="#sec-temporal-canonicalizeeraincalendar">CanonicalizeEraInCalendar</a></emu-xref>(<var>calendar</var>, <var>era</var>).</li></ol></emu-alg>
43954395
</emu-clause>
43964396
43974397
<emu-clause id="sec-temporal-calendardateerayear" type="abstract operation" aoid="CalendarDateEraYear">
43984398
<h1><span class="secnum">4.1.6</span> CalendarDateEraYear ( <var>calendar</var>, <var>date</var> )</h1>
43994399
<p>The abstract operation CalendarDateEraYear takes arguments <var>calendar</var> (a <emu-xref href="#sec-ecma402-calendar-types" id="_ref_23"><a href="#sec-ecma402-calendar-types">calendar type</a></emu-xref> that is not <emu-val>"iso8601"</emu-val>) and <var>date</var> (a Temporal.PlainDateTime, Temporal.PlainDate, or Temporal.PlainYearMonth) and returns an <emu-xref href="#integer"><a href="https://tc39.es/ecma262/#integer">integer</a></emu-xref> or <emu-val>undefined</emu-val>. It performs <emu-xref href="#implementation-defined"><a href="https://tc39.es/ecma262/#implementation-defined">implementation-defined</a></emu-xref> processing to find the era for the date corresponding to <var>date</var> in the context of the calendar represented by <var>calendar</var> and returns an <emu-xref href="#integer"><a href="https://tc39.es/ecma262/#integer">integer</a></emu-xref> representing the ordinal position of the year of <var>date</var> in that era, or <emu-val>undefined</emu-val> for calendars that do not have eras. It performs the following steps when called:</p>
44004400
4401-
<emu-alg><ol><li>If <emu-xref aoid="CalendarSupportsEra" id="_ref_24"><a href="#sec-temporal-calendarsupportsera">CalendarSupportsEra</a></emu-xref>(<var>calendar</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>eraYear</var> be the <emu-xref href="#integer"><a href="https://tc39.es/ecma262/#integer">integer</a></emu-xref> to indicate the era year corresponding to <var>date</var> in the context of the calendar represented by <var>calendar</var> from an <emu-xref href="#implementation-defined"><a href="https://tc39.es/ecma262/#implementation-defined">implementation-defined</a></emu-xref> processing.</li><li><emu-xref href="#assert"><a href="https://tc39.es/ecma262/#assert">Assert</a></emu-xref>: <var>eraYear</var> is an <emu-xref href="#integer"><a href="https://tc39.es/ecma262/#integer">integer</a></emu-xref>.</li><li>Return <var>eraYear</var>.</li></ol></emu-alg>
4401+
<emu-alg><ol><li>If <emu-xref aoid="CalendarSupportsEra" id="_ref_24"><a href="#sec-temporal-calendarsupportsera">CalendarSupportsEra</a></emu-xref>(<var>calendar</var>) is <emu-val>false</emu-val>, return <emu-val>undefined</emu-val>.</li><li>Let <var>eraYear</var> be the <emu-xref href="#integer"><a href="https://tc39.es/ecma262/#integer">integer</a></emu-xref> to indicate the era year corresponding to <var>date</var> in the context of the calendar represented by <var>calendar</var> according to <emu-xref href="#implementation-defined"><a href="https://tc39.es/ecma262/#implementation-defined">implementation-defined</a></emu-xref> processing.</li><li><emu-xref href="#assert"><a href="https://tc39.es/ecma262/#assert">Assert</a></emu-xref>: <var>eraYear</var> is an <emu-xref href="#integer"><a href="https://tc39.es/ecma262/#integer">integer</a></emu-xref>.</li><li>Return <var>eraYear</var>.</li></ol></emu-alg>
44024402
<emu-note><span class="note">Note</span><div class="note-contents">
44034403
Era years are 1-indexed for many calendars, but not all (e.g., the eras of the Burmese calendar each start with a year 0). Years can also advance opposite the flow of time (as for BCE years in the Gregorian calendar).
44044404
</div></emu-note>

spec.emu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ contributors: Google, Ecma International
545545
</dl>
546546
<emu-alg>
547547
1. If CalendarSupportsEra(_calendar_) is *false*, return *undefined*.
548-
1. Let _era_ be the String to indicate the era corresponding to _date_ in the context of the calendar represented by _calendar_ from an implementation-defined processing.
548+
1. Let _era_ be the String to indicate the era corresponding to _date_ in the context of the calendar represented by _calendar_ according to implementation-defined processing.
549549
1. Return CanonicalizeEraInCalendar(_calendar_, _era_).
550550
</emu-alg>
551551
</emu-clause>
@@ -564,7 +564,7 @@ contributors: Google, Ecma International
564564
</dl>
565565
<emu-alg>
566566
1. If CalendarSupportsEra(_calendar_) is *false*, return *undefined*.
567-
1. Let _eraYear_ be the integer to indicate the era year corresponding to _date_ in the context of the calendar represented by _calendar_ from an implementation-defined processing.
567+
1. Let _eraYear_ be the integer to indicate the era year corresponding to _date_ in the context of the calendar represented by _calendar_ according to implementation-defined processing.
568568
1. Assert: _eraYear_ is an integer.
569569
1. Return _eraYear_.
570570
</emu-alg>

0 commit comments

Comments
 (0)