[html5] r2385 - [] (0) WF2: Define weeks.

whatwg at whatwg.org whatwg at whatwg.org
Fri Oct 31 15:11:58 PDT 2008


Author: ianh
Date: 2008-10-31 15:11:57 -0700 (Fri, 31 Oct 2008)
New Revision: 2385

Modified:
   index
   source
Log:
[] (0) WF2: Define weeks.

Modified: index
===================================================================
--- index	2008-10-30 01:56:34 UTC (rev 2384)
+++ index	2008-10-31 22:11:57 UTC (rev 2385)
@@ -16,7 +16,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 30 October 2008</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 31 October 2008</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -3190,19 +3190,35 @@
 
   </ol><h5 id=weeks><span class=secno>2.4.4.6 </span>Weeks</h5>
 
-  <p>A <dfn id=concept-week 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 href=#refsGREGORIAN>[GREGORIAN]</a></p>
+  <p>A <dfn id=concept-week 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 id=week-number>week number</dfn> of a day is ...</p>
+  <p>The <dfn id=week-number-of-the-last-day>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 id=week-number-of-the-last-day>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 id=valid-week-string>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 id=valid-week-string>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><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var></li>
 
@@ -3213,12 +3229,12 @@
    <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
    representing the week <var title="">week</var>, in the range
    1 ≤ <var title="">week</var> ≤ <var title="">maxweek</var>, where <var title="">maxweek</var> is the
-   <a href=#week-number-of-the-last-day>week number of the last day</a> of year <var title="">year</var></li>
+   <a href=#week-number-of-the-last-day>week number of the last day</a> of week-year <var title="">year</var></li>
 
   </ol><p>The rules to <dfn id=parse-a-week-string>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><li><p>Let <var title="">input</var> be the string being
    parsed.</li>
@@ -3236,7 +3252,7 @@
    then fail. Otherwise, move <var title="">position</var> forwards
    one character.</li>
 
-   <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
+   <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 U+0057 LATIN CAPITAL LETTER W
    character, then fail. Otherwise, move <var title="">position</var>
    forwards one character.</li>
 
@@ -3255,7 +3271,8 @@
    <li><p>If <var title="">position</var> is <em>not</em> beyond the
    end of <var title="">input</var>, then fail.</li>
 
-   <li><p>Return <var title="">year</var> and <var title="">week</var>.</li>
+   <li><p>Return the week-year number <var title="">year</var> and the
+   week number <var title="">week</var>.</li>
 
   </ol><h5 id=vaguer-moments-in-time><span class=secno>2.4.4.7 </span>Vaguer moments in time</h5>
 
@@ -23356,7 +23373,7 @@
      <td> A month control
     <tr><td> <dfn id=attr-input-type-week-keyword title=attr-input-type-week-keyword><code>week</code></dfn>
      <td> <a href=#week-state title=attr-input-type-week>Week</a>
-     <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 id=attr-input-type-time-keyword title=attr-input-type-time-keyword><code>time</code></dfn>
      <td> <a href=#time-state title=attr-input-type-time>Time</a>

Modified: source
===================================================================
--- source	2008-10-30 01:56:34 UTC (rev 2384)
+++ source	2008-10-31 22:11:57 UTC (rev 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 ≤ <var title="">week</var> ≤ <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>




More information about the Commit-Watchers mailing list