Skip to content

Commit 28843e0

Browse files
committed
Use descriptive name for canonicalName
1 parent f0e53a7 commit 28843e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4335,7 +4335,7 @@ <h1><span class="secnum">4.1.2</span> CanonicalizeEraInCalendar ( <var>calendar<
43354335
<p>The abstract operation CanonicalizeEraInCalendar takes arguments <var>calendar</var> (a String) and <var>era</var> (a String) and returns a String or <emu-val>undefined</emu-val>.
43364336
The following algorithm refers to the era data from <a href="https://unicode.org/reports/tr35/tr35-dates.html#Calendar_Data">UTS 35's Supplemental Calendar Data</a>.
43374337
It performs the following steps when called:</p>
4338-
<emu-alg><ol><li>For each row of <emu-xref href="#table-eras" id="_ref_4"><a href="#table-eras">Table 2</a></emu-xref>, do<ol><li>Let <var>cal</var> be the Calendar value of the current row.</li><li>If <var>cal</var> is equal to <var>calendar</var>, then<ol><li>Let <var>e</var> be the Era value of the current row.</li><li>If <var>e</var> is equal to <var>era</var>, return <var>era</var>.</li><li>Let <var>aliases</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the strings given in the Aliases column of the row.</li><li>If <var>aliases</var> contains <var>era</var>, return <var>e</var>.</li></ol></li></ol></li><li>Return <emu-val>undefined</emu-val>.</li></ol></emu-alg>
4338+
<emu-alg><ol><li>For each row of <emu-xref href="#table-eras" id="_ref_4"><a href="#table-eras">Table 2</a></emu-xref>, do<ol><li>Let <var>cal</var> be the Calendar value of the current row.</li><li>If <var>cal</var> is equal to <var>calendar</var>, then<ol><li>Let <var>canonicalName</var> be the Era value of the current row.</li><li>If <var>canonicalName</var> is equal to <var>era</var>, return <var>canonicalName</var>.</li><li>Let <var>aliases</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref> whose elements are the strings given in the Aliases column of the row.</li><li>If <var>aliases</var> contains <var>era</var>, return <var>canonicalName</var>.</li></ol></li></ol></li><li>Return <emu-val>undefined</emu-val>.</li></ol></emu-alg>
43394339
</emu-clause>
43404340
43414341
<emu-clause id="sec-temporal-isvalidmonthecodeforcalendar" type="abstract operation" aoid="IsValidMonthCodeForCalendar">

spec.emu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,10 @@ contributors: Google, Ecma International
442442
1. For each row of <emu-xref href="#table-eras"></emu-xref>, do
443443
1. Let _cal_ be the Calendar value of the current row.
444444
1. If _cal_ is equal to _calendar_, then
445-
1. Let _e_ be the Era value of the current row.
446-
1. If _e_ is equal to _era_, return _era_.
445+
1. Let _canonicalName_ be the Era value of the current row.
446+
1. If _canonicalName_ is equal to _era_, return _canonicalName_.
447447
1. Let _aliases_ be a List whose elements are the strings given in the Aliases column of the row.
448-
1. If _aliases_ contains _era_, return _e_.
448+
1. If _aliases_ contains _era_, return _canonicalName_.
449449
1. Return *undefined*.
450450
</emu-alg>
451451
</emu-clause>

0 commit comments

Comments
 (0)