Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Add note to ref to UTS35 about weekinfo #87

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,10 @@ <h1><span class="secnum">1.1.10</span> WeekInfoOfLocale ( <var>loc</var> )</h1>
</p>
<emu-alg><ol><li>Let <var>locale</var> be <var>loc</var>.[[Locale]].</li><li><emu-xref href="#assert"><a href="https://tc39.es/ecma262/#assert">Assert</a></emu-xref>: <var>locale</var> matches the <code>unicode_locale_id</code> production.</li><li>Let <var>r</var> be a record 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>.[[FirstDayOfWeek]].</li><li>Let <var>fw</var> be !<emu-xref aoid="StringToWeekdayValue" id="_ref_17"><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>.[[FirstDay]] 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 @@ -203,6 +203,10 @@ <h1>WeekInfoOfLocale ( _loc_ )</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>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???? do you have internet problem? it is a good link

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The anchor "#first-day-overrides" doesn't exist.

The relevant source code:

<h4>First Day Overrides</h4>

This must instead be:

<h4><a name="first-day-overrides" href="#first-day-overrides">First Day Overrides</a></h4>

for anchors to work.

Copy link
Collaborator Author

@FrankYFTang FrankYFTang Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But

<script src="./js/anchor.min.js"></script>

in the beginning of https://www.unicode.org/reports/tr35/tr35-dates.html add the id for the <h4>

see https://www.w3schools.com/html/html_id.asp
and https://www.bryanbraun.com/anchorjs/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks, that's explains it. With JS disabled, the "#first-day-overrides" anchor doesn't work, whereas all other anchors I've tried do work.

</emu-note>

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