Skip to content

Commit

Permalink
Merge pull request #87 from tc39/AddNoteOfWeekData
Browse files Browse the repository at this point in the history
Editorial: Add note to ref to UTS35 about weekinfo
  • Loading branch information
FrankYFTang authored Nov 21, 2024
2 parents 11afbce + 81cdda5 commit 091f59e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3418,6 +3418,10 @@ <h1><span class="secnum">1.1.10</span> WeekInfoOfLocale ( <var>loc</var> )</h1>
<p>The abstract operation WeekInfoOfLocale takes argument <var>loc</var> (an Intl.Locale) and returns a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref>. The following algorithm refers to Locale data specified in <a href="https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Patterns_Week_Elements" data-print-href="">UTS 35's Week Elements</a>. It performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>locale</var> be <var>loc</var>.<var class="field">[[Locale]]</var>.</li><li>Let <var>r</var> be a <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> whose fields are defined by <emu-xref href="#table-locale-weekinfo-record" id="_ref_2"><a href="#table-locale-weekinfo-record">Table 2</a></emu-xref>, with values based on <var>locale</var>.</li><li>Let <var>fws</var> be <var>loc</var>.<var class="field">[[FirstDayOfWeek]]</var>.</li><li>Let <var>fw</var> be <emu-xref aoid="StringToWeekdayValue" id="_ref_15"><a href="#sec-string-to-weekday-value">StringToWeekdayValue</a></emu-xref>(<var>fws</var>).</li><li>If <var>fw</var> is not <emu-val>undefined</emu-val>, then<ol><li>Set <var>r</var>.<var class="field">[[FirstDay]]</var> to <var>fw</var>.</li></ol></li><li>Return <var>r</var>.</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
The record's return values are determined by <var>locale</var>, in accordance with the specifications outlined in <a href="https://www.unicode.org/reports/tr35/tr35-dates.html#Week_Data">UTS 35's Week Data</a> and <a href="https://www.unicode.org/reports/tr35/tr35-dates.html#first-day-overrides">First Day Overrides</a>.
</div></emu-note>
<emu-table id="table-locale-weekinfo-record"><figure><figcaption>Table 2: WeekInfo <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> Fields</figcaption>
<table class="real-table">
Expand Down
4 changes: 4 additions & 0 deletions locale.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ <h1>
1. Return _r_.
</emu-alg>

<emu-note>
The record's return values are determined by _locale_, in accordance with the specifications outlined in <a href="https://www.unicode.org/reports/tr35/tr35-dates.html#Week_Data">UTS 35's Week Data</a> and <a href="https://www.unicode.org/reports/tr35/tr35-dates.html#first-day-overrides">First Day Overrides</a>.
</emu-note>

<emu-table id="table-locale-weekinfo-record">
<emu-caption>WeekInfo Record Fields</emu-caption>
<table class="real-table">
Expand Down

0 comments on commit 091f59e

Please sign in to comment.