Skip to content

Commit 22f4df1

Browse files
committed
Specify that only the ISO calendar has week numbering
Currently none of the other supported calendars have a well-defined, locale-independent week numbering system, to the best of our knowledge. Specify the [[WeekOfYear]] field as such in the table. Closes: #15
1 parent ab63bbf commit 22f4df1

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

biblio.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
"type": "term",
2727
"term": "calendar type",
2828
"id": "sec-calendar-types"
29+
},
30+
{
31+
"type": "term",
32+
"term": "Year-Week Record",
33+
"id": "sec-year-week-record-specification-type"
2934
}
3035
]
3136
}

index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4336,16 +4336,20 @@ <h1><span class="secnum">1.5</span> Calendar Date Records</h1>
43364336
</tr>
43374337
<tr>
43384338
<td><var class="field">[[WeekOfYear]]</var></td>
4339-
<td>a Year-Week <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></td>
4339+
<td>a <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref></td>
43404340
<td>
43414341
<p>The date's <em>calendar week of year</em>, and the corresponding <em>week calendar year</em>.</p>
4342-
<p>The Year-Week <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>'s <var class="field">[[Week]]</var> field should be 1-based.</p>
4343-
<p>The Year-Week <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>'s <var class="field">[[Year]]</var> field is relative to the first day of a calendar-specific "epoch year", as in the <emu-xref href="#sup-temporal-calendar-date-records" id="_ref_12"><a href="#sup-temporal-calendar-date-records">Calendar Date Record</a></emu-xref>'s <var class="field">[[Year]]</var> field, not relative to an era as in <var class="field">[[EraYear]]</var>.</p>
4342+
<p>The <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref>'s <var class="field">[[Week]]</var> field should be 1-based.</p>
4343+
<p>The <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref>'s <var class="field">[[Year]]</var> field is relative to the first day of a calendar-specific "epoch year", as in the <emu-xref href="#sup-temporal-calendar-date-records" id="_ref_12"><a href="#sup-temporal-calendar-date-records">Calendar Date Record</a></emu-xref>'s <var class="field">[[Year]]</var> field, not relative to an era as in <var class="field">[[EraYear]]</var>.</p>
43444344
<p>
4345-
Usually the Year-Week <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>'s <var class="field">[[Year]]</var> field will contain the same value as the <emu-xref href="#sup-temporal-calendar-date-records" id="_ref_13"><a href="#sup-temporal-calendar-date-records">Calendar Date Record</a></emu-xref>'s <var class="field">[[Year]]</var> field, but may contain the previous or next year if the week number in the Year-Week <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>'s <var class="field">[[Week]]</var> field overlaps two different years.
4345+
Usually the <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref>'s <var class="field">[[Year]]</var> field will contain the same value as the <emu-xref href="#sup-temporal-calendar-date-records" id="_ref_13"><a href="#sup-temporal-calendar-date-records">Calendar Date Record</a></emu-xref>'s <var class="field">[[Year]]</var> field, but may contain the previous or next year if the week number in the <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref>'s <var class="field">[[Week]]</var> field overlaps two different years.
43464346
See also ISOWeekOfYear.
43474347
</p>
4348-
<p>The Year-Week <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> contains <emu-val>undefined</emu-val> in <var class="field">[[Week]]</var> and <var class="field">[[Year]]</var> field for calendars that do not have a well-defined week calendar system.</p>
4348+
<p>The <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref> contains <emu-val>undefined</emu-val> in <var class="field">[[Week]]</var> and <var class="field">[[Year]]</var> field for calendars that do not have a well-defined week numbering system.</p>
4349+
<emu-note><span class="note">Note 5</span><div class="note-contents">
4350+
Currently, of the calendars supported in this specification, only <emu-val>"iso8601"</emu-val> has a well-defined, locale-independent week numbering system.
4351+
For all other calendars, the <emu-xref href="#sec-year-week-record-specification-type"><a href="https://tc39.es/proposal-temporal/#sec-year-week-record-specification-type">Year-Week Record</a></emu-xref> fields are <emu-val>undefined</emu-val>.
4352+
</div></emu-note>
43494353
</td>
43504354
</tr>
43514355
<tr>
@@ -4373,7 +4377,7 @@ <h1><span class="secnum">1.5</span> Calendar Date Records</h1>
43734377
<td>a Boolean</td>
43744378
<td>
43754379
<emu-val>true</emu-val> if the date falls within a leap year, and <emu-val>false</emu-val> otherwise.
4376-
<emu-note><span class="note">Note 5</span><div class="note-contents">
4380+
<emu-note><span class="note">Note 6</span><div class="note-contents">
43774381
A "leap year" is a year that contains more days than other years (for solar or lunar calendars) or more months than other years (for lunisolar calendars like Hebrew or Chinese).
43784382
Some calendars, especially lunisolar ones, have further variation in year length that is not represented in the output of this operation (e.g., the Hebrew calendar includes common years with 353, 354, or 355 days and leap years with 383, 384, or 385 days).
43794383
</div></emu-note>

spec.emu

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,11 @@ contributors: Google, Ecma International
452452
Usually the Year-Week Record's [[Year]] field will contain the same value as the Calendar Date Record's [[Year]] field, but may contain the previous or next year if the week number in the Year-Week Record's [[Week]] field overlaps two different years.
453453
See also ISOWeekOfYear.
454454
</p>
455-
<p>The Year-Week Record contains *undefined* in [[Week]] and [[Year]] field for calendars that do not have a well-defined week calendar system.</p>
455+
<p>The Year-Week Record contains *undefined* in [[Week]] and [[Year]] field for calendars that do not have a well-defined week numbering system.</p>
456+
<emu-note>
457+
Currently, of the calendars supported in this specification, only *"iso8601"* has a well-defined, locale-independent week numbering system.
458+
For all other calendars, the Year-Week Record fields are *undefined*.
459+
</emu-note>
456460
</td>
457461
</tr>
458462
<tr>

0 commit comments

Comments
 (0)