HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2385

File a bug

SVNBugCommentTime (UTC)
2385WF2: Define weeks.2008-10-31 22:11
Index: source
===================================================================
--- source	(revision 2384)
+++ source	(revision 2385)
@@ -2633,20 +2633,37 @@
 
   <h5>Weeks</h5>
 
-  <p>A <dfn title="concept-week">week</dfn> consists of a specific
-  Gregorian date with no timezone information and no date information
-  beyond a year and a week. <a
+  <p>A <dfn title="concept-week">week</dfn> consists of a week-year
+  number and a week number representing a seven day period. Each
+  week-year in this calendaring system has either 52 weeks or 53
+  weeks, as defined below. A week is a seven-day period. The week
+  starting on the Gregorian date Monday December 29th 1969
+  (1969-12-29) is defined as week number 1 in week-year
+  1970. Consecutive weeks are numbered sequentially. The week before
+  the number 1 week in a week-year is the last week in the previous
+  week-year, and vice versa. <a
   href="#refsGREGORIAN">[GREGORIAN]</a></p>
 
-  <!-- XXX ISO week information -->
+  <p>A week-year with a number <var title="">year</var> that
+  corresponds to a year <var title="">year</var> in the Gregorian
+  calendar that has a Thursday as its first day (January 1st), and a
+  week-year <var title="">year</var> where <var title="">year</var> is
+  a number divisible by 400, or a number divisible by 4 but not by
+  100, has 53 weeks. All other week-years have 52 weeks.</p>
 
-  <p class="XXX">The <dfn>week number</dfn> of a day is ...</p>
+  <p>The <dfn>week number of the last day</dfn> of a week-year with 53
+  weeks is 53; the week number of the last day of a week-year with 52
+  weeks is 52.</p>
 
-  <p class="XXX">The <dfn>week number of the last day</dfn> of a year ...</p>
+  <p class="note">The week-year number of a particular day can be
+  different than the number of the year that contains that day in the
+  Gregorian calendar. The first week in a week-year <var
+  title="">year</var> is the week that contains the first Thursday of
+  the Gregorian year <var title="">year</var>.</p>
 
-  <p>A string is a <dfn>valid week string</dfn> representing a year
-  <var title="">year</var> and week <var title="">week</var> if it
-  consists of the following components in the given order:</p>
+  <p>A string is a <dfn>valid week string</dfn> representing a
+  week-year <var title="">year</var> and week <var title="">week</var>
+  if it consists of the following components in the given order:</p>
 
   <ol>
 
@@ -2662,15 +2679,15 @@
    representing the week <var title="">week</var>, in the range
    1&nbsp;&le;&nbsp;<var title="">week</var>&nbsp;&le;&nbsp;<var
    title="">maxweek</var>, where <var title="">maxweek</var> is the
-   <span>week number of the last day</span> of year <var
+   <span>week number of the last day</span> of week-year <var
    title="">year</var></li>
 
   </ol>
 
   <p>The rules to <dfn>parse a week string</dfn> are as follows. This
-  will either return a year and week, or nothing. If at any point the
-  algorithm says that it "fails", this means that it is aborted at
-  that point and returns nothing.</p>
+  will either return a week-year number and week number, or
+  nothing. If at any point the algorithm says that it "fails", this
+  means that it is aborted at that point and returns nothing.</p>
 
   <ol>
 
@@ -2695,7 +2712,7 @@
 
    <li><p>If <var title="">position</var> is beyond the end of <var
    title="">input</var> or if the character at <var
-   title="">position</var> is not a 0057 LATIN CAPITAL LETTER W
+   title="">position</var> is not a U+0057 LATIN CAPITAL LETTER W
    character, then fail. Otherwise, move <var title="">position</var>
    forwards one character.</p></li>
 
@@ -2715,8 +2732,8 @@
    <li><p>If <var title="">position</var> is <em>not</em> beyond the
    end of <var title="">input</var>, then fail.</p></li>
 
-   <li><p>Return <var title="">year</var> and <var
-   title="">week</var>.</p></li>
+   <li><p>Return the week-year number <var title="">year</var> and the
+   week number <var title="">week</var>.</p></li>
 
   </ol>
 
@@ -26061,7 +26078,7 @@
     <tr>
      <td> <dfn title="attr-input-type-week-keyword"><code>week</code></dfn>
      <td> <span title="attr-input-type-week">Week</span>
-     <td> A date consisting of a year and a week number with no time zone
+     <td> A date consisting of a week-year number and a week number with no time zone
      <td> A week control
     <tr>
      <td> <dfn title="attr-input-type-time-keyword"><code>time</code></dfn>

|