W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2008

html5/spec Overview.html,1.1553,1.1554

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 30 Oct 2008 00:58:19 +0000
To: public-html-commits@w3.org
Message-Id: <E1KvLrf-0006Oc-Hr@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv24572

Modified Files:
	Overview.html 
Log Message:
Define 'local date and time', 'date', 'time', and redefine 'global date and time' in a more factored-out way. (whatwg r2382)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1553
retrieving revision 1.1554
diff -u -d -r1.1553 -r1.1554
--- Overview.html	30 Oct 2008 00:21:56 -0000	1.1553
+++ Overview.html	30 Oct 2008 00:58:16 -0000	1.1554
@@ -164,12 +164,12 @@
        <li><a href=#lists-of-integers><span class=secno>2.4.3.6 </span>Lists of integers</a></ol></li>
      <li><a href=#dates-and-times><span class=secno>2.4.4 </span>Dates and times</a>
       <ol>
-       <li><a href=#global-dates-and-times><span class=secno>2.4.4.1 </span>Global dates and times</a></li>
-       <li><a href=#local-dates-and-times><span class=secno>2.4.4.2 </span>Local dates and times</a></li>
-       <li><a href=#dates><span class=secno>2.4.4.3 </span>Dates</a></li>
-       <li><a href=#months><span class=secno>2.4.4.4 </span>Months</a></li>
-       <li><a href=#weeks><span class=secno>2.4.4.5 </span>Weeks</a></li>
-       <li><a href=#times><span class=secno>2.4.4.6 </span>Times</a></li>
+       <li><a href=#dates><span class=secno>2.4.4.1 </span>Dates</a></li>
+       <li><a href=#times><span class=secno>2.4.4.2 </span>Times</a></li>
+       <li><a href=#local-dates-and-times><span class=secno>2.4.4.3 </span>Local dates and times</a></li>
+       <li><a href=#global-dates-and-times><span class=secno>2.4.4.4 </span>Global dates and times</a></li>
+       <li><a href=#months><span class=secno>2.4.4.5 </span>Months</a></li>
+       <li><a href=#weeks><span class=secno>2.4.4.6 </span>Weeks</a></li>
        <li><a href=#vaguer-moments-in-time><span class=secno>2.4.4.7 </span>Vaguer moments in time</a></li>
        <li><a href=#time-offsets><span class=secno>2.4.4.8 </span>Time offsets</a></ol></li>
      <li><a href=#space-separated-tokens><span class=secno>2.4.5 </span>Space-separated tokens</a></li>
@@ -2230,50 +2230,267 @@
   12; <em>30</em> if <var title="">month</var> is 4, 6, 9, or 11;
   <em>29</em> if <var title="">month</var> is 2 and <var title="">year</var> is a number divisible by 400, or if <var title="">year</var> is a number divisible by 4 but not by 100; and
   <em>28</em> otherwise. This takes into account leap years in the
-  Gregorian calendar. <a href=#references>[GREGORIAN]</a><h5 id=global-dates-and-times><span class=secno>2.4.4.1 </span>Global dates and times</h5><p>A <dfn id=concept-datetime title=concept-datetime>global date and time</dfn>
-  consists of a specific Gregorian date, consisting of a year, a
-  month, a day, an hour, a minute, a second, and a fraction of a
-  second, expressed with a time zone, consisting of a number of hours
-  and minutes. <a href=#references>[GREGORIAN]</a></p><!--XXX [GREGORIAN] should point to
-  <dd id="refsGREGORIAN">[GREGORIAN]</dd>
-  <dd>(Non-normative) <cite>Inter Gravissimas</cite>, A. Lilius, C. Clavius. Gregory XIII Papal Bulls, February 1582.</dd>
-  --><p>A string is a <dfn id=valid-global-date-and-time-string>valid global date and time string</dfn> if it
-  has the components in the following list, in the given order, and if
-  the components in the list follow the constraints given after the
-  list:<ol><li>Four or more digits (representing the year)</li>
+  Gregorian calendar. <a href=#references>[GREGORIAN]</a><p>The <dfn id=concept-datetime-digit title=concept-datetime-digit>digits</dfn> in the date
+  and time syntaxes defined in this section must be characters in the
+  range U+0030 DIGIT ZERO to U+0039 DIGIT NINE, used to express
+  numbers in base ten.<h5 id=dates><span class=secno>2.4.4.1 </span>Dates</h5><p>A <dfn id=concept-date title=concept-date>date</dfn> consists of a specific
+  Gregorian date with no timezone information, consisting of a year, a
+  month, and a day. <a href=#references>[GREGORIAN]</a><p>A string is a <dfn id=valid-date-string>valid date string</dfn> if it has the
+  components in the following list, in the given order, and if the
+  components in the list follow the constraints given after the
+  list:<ol><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the year)</li>
 
    <li>A U+002D HYPHEN-MINUS character (-).</li>
 
-   <li>Two digits (representing the month)</li>
+   <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the month)</li>
 
    <li>A U+002D HYPHEN-MINUS character (-).</li>
 
-   <li>Two digits (representing the day)</li>
+   <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the day)</li>
 
-   <li>A U+0054 LATIN CAPITAL LETTER T character.</li>
+  </ol><p>The aforementioned constraints are:<ul><li>The month <var title="">m</var> must be in the range
+   0&nbsp;&le;&nbsp;<var title="">m</var>&nbsp;&le;&nbsp;12.</li>
 
-   <li>Two digits (representing the hour)</li>
+   <li>The day <var title="">d</var> must be in the range
+   0&nbsp;&le;&nbsp;<var title="">d</var>&nbsp;&le;&nbsp;<var title="">D</var> where <var title="">D</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
+   in the given month and year</a>.</li>
+
+  </ul><p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This
+  will either return a date, or nothing. If at any point the algorithm
+  says that it "fails", this means that it is aborted at that point
+  and returns nothing.<ol><li><p>Let <var title="">input</var> be the string being
+   parsed.</li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
+   string.</li>
+
+   <li><p><a href=#parse-a-date-component>Parse a date component</a> to obtain <var title="">year</var>, <var title="">month</var>, and <var title="">day</var>. If this returns nothing, then fail.</p>
+
+   <li><p>If <var title="">position</var> is <em>not</em> beyond the
+   end of <var title="">input</var>, then fail.</li>
+
+   <li><p>Let <var title="">date</var> be the date with year <var title="">year</var>, month <var title="">month</var>, and day <var title="">day</var>.</li>
+
+   <li><p>Return <var title="">date</var>.</li>
+
+  </ol><p>The rules to <dfn id=parse-a-date-component>parse a date component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
+  as follows. This will either return a year, a month, and a day, or
+  nothing. If at any point the algorithm says that it "fails", this
+  means that it is aborted at that point and returns nothing.<ol><li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
+   sequence is not at least four characters long, then
+   fail. Otherwise, interpret the resulting sequence as a base-ten
+   integer. Let that number be the <var title="">year</var>.</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 U+002D HYPHEN-MINUS character,
+   then fail. Otherwise, move <var title="">position</var> forwards
+   one character.</li>
+
+   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
+   sequence is not exactly two characters long, then fail. Otherwise,
+   interpret the resulting sequence as a base-ten integer. Let that
+   number be the <var title="">month</var>.</li>
+
+   <li>If <var title="">month</var> is not a number in the range
+   1&nbsp;&le;&nbsp;<var title="">month</var>&nbsp;&le;&nbsp;12, then
+   fail.</li>
+
+   <li><p>Let <var title="">maxday</var> be the <a href=#number-of-days-in-month-month-of-year-year>number of days
+   in month <var title="">month</var> of year <var title="">year</var></a>.</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 U+002D HYPHEN-MINUS character,
+   then fail. Otherwise, move <var title="">position</var> forwards
+   one character.</li>
+
+   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
+   sequence is not exactly two characters long, then fail. Otherwise,
+   interpret the resulting sequence as a base-ten integer. Let that
+   number be the <var title="">day</var>.</li>
+
+   <li><p>If <var title="">day</var> is not a number in the range
+   1&nbsp;&le;&nbsp;<var title="">month</var>&nbsp;&le;&nbsp;<var title="">maxday</var>, then fail.</li>
+
+   <li><p>Return <var title="">year</var>, <var title="">month</var>,
+   and <var title="">day</var>.</li>
+
+  </ol><h5 id=times><span class=secno>2.4.4.2 </span>Times</h5><p>A <dfn id=concept-time title=concept-time>time</dfn> consists of a specific
+  time with no timezone information, consisting of an hour, a minute,
+  a second, and a fraction of a second.<p>A string is a <dfn id=valid-time-string>valid time string</dfn> if it has the
+  components in the following list, in the given order, and if the
+  components in the list follow the constraints given after the
+  list:<ol><li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the hour)</li>
 
    <li>A U+003A COLON character (:).</li>
 
-   <li>Two digits (representing the minutes)</li>
+   <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the minutes)</li>
 
    <li>Optionally:
 
     <ol><li>A U+003A COLON character (:).</li>
 
-     <li>Two digits (representing the integer part of the seconds)</li>
+     <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the integer part of the seconds)</li>
 
      <li>Optionally:
 
       <ol><li>A 002E FULL STOP character (.)</li>
 
-       <li>One or more digits (representing the fractional part of the seconds)</li>
+       <li>One or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the fractional part of the seconds)</li>
 
       </ol></li>
 
     </ol></li>
 
+  </ol><p>The aforementioned constraints are:<ul><li>The hour <var title="">h</var> must be in the range
+   0&nbsp;&le;&nbsp;<var title="">h</var>&nbsp;&le;&nbsp;23.</li>
+
+   <li>The minute <var title="">m</var> must be in the range
+   0&nbsp;&le;&nbsp;<var title="">m</var>&nbsp;&le;&nbsp;59.</li>
+
+   <li>If present, the second <var title="">s</var> (consisting of the
+   integer part and its fractional part) must be in the range
+   0&nbsp;&le;&nbsp;<var title="">s</var>&nbsp;&lt;&nbsp;60.  (The
+   values 60 and 61 are not allowed: leap seconds cannot be
+   represented by datetime values.)</li>
+
+  </ul><p>The rules to <dfn id=parse-a-time-string>parse a time string</dfn> are as follows. This
+  will either return a time, or nothing. If at any point the algorithm
+  says that it "fails", this means that it is aborted at that point
+  and returns nothing.<ol><li><p>Let <var title="">input</var> be the string being
+   parsed.</li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
+   string.</li>
+
+   <li><p><a href=#parse-a-time-component>Parse a time component</a> to obtain <var title="">hour</var>, <var title="">minute</var>, and <var title="">second</var>. If this returns nothing, then fail.</p>
+
+   <li><p>If <var title="">position</var> is <em>not</em> beyond the
+   end of <var title="">input</var>, then fail.</li>
+
+   <li><p>Let <var title="">time</var> be the time with hour <var title="">hour</var>, minute <var title="">minute</var>, and second
+   <var title="">second</var>.</li>
+
+   <li><p>Return <var title="">time</var>.</li>
+
+  </ol><p>The rules to <dfn id=parse-a-time-component>parse a time component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
+  as follows. This will either return an hour, a minute, and a second,
+  or nothing. If at any point the algorithm says that it "fails", this
+  means that it is aborted at that point and returns nothing.<ol><li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
+   sequence is not exactly two characters long, then fail. Otherwise,
+   interpret the resulting sequence as a base-ten integer. Let that
+   number be the <var title="">hour</var>.</li>
+
+   <li>If <var title="">hour</var> is not a number in the range
+   0&nbsp;&le;&nbsp;<var title="">hour</var>&nbsp;&le;&nbsp;23, then
+   fail.</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 U+003A COLON character, then
+   fail. Otherwise, move <var title="">position</var> forwards one
+   character.</li>
+
+   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
+   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
+   sequence is not exactly two characters long, then fail. Otherwise,
+   interpret the resulting sequence as a base-ten integer. Let that
+   number be the <var title="">minute</var>.</li>
+
+   <li>If <var title="">minute</var> is not a number in the range
+   0&nbsp;&le;&nbsp;<var title="">minute</var>&nbsp;&le;&nbsp;59, then
+   fail.</li>
+
+   <li><p>Let <var title="">second</var> be a string with the value
+   "0".</li>
+
+   <li>
+
+    <p>If <var title="">position</var> is not beyond the end of
+    <var title="">input</var> and the character at <var title="">position</var> is a U+003A COLON, then run these
+    substeps:</p>
+
+    <ol><li><p>Advance <var title="">position</var> to the next character
+     in <var title="">input</var>.</li>
+
+     <li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, or at the last character in <var title="">input</var>, or if the next <em>two</em> characters in
+     <var title="">input</var> starting at <var title="">position</var> are not two characters both in the range
+     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then
+     fail.</li>
+
+     <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
+     either characters in the range U+0030 DIGIT ZERO (0) to U+0039
+     DIGIT NINE (9) or U+002E FULL STOP characters. If the collected
+     sequence has more than one U+002E FULL STOP characters, or if the
+     last character in the sequence is a U+002E FULL STOP character,
+     then fail. Otherwise, let the collected string be <var title="">second</var> instead of its previous value.</li>
+
+    </ol></li>
+
+   <li><p>Interpret <var title="">second</var> as a base-ten number
+   (possibly with a fractional part). Let <var title="">second</var>
+   be that number instead of the string version.</li>
+
+   <li>If <var title="">second</var> is not a number in the range
+   0&nbsp;&le;&nbsp;<var title="">second</var>&nbsp;&lt;&nbsp;60, then
+   fail.</li>
+
+   <li><p>Return <var title="">hour</var>, <var title="">minute</var>,
+   and <var title="">second</var>.</li>
+
+  </ol><h5 id=local-dates-and-times><span class=secno>2.4.4.3 </span>Local dates and times</h5><p>A <dfn id=concept-datetime-local title=concept-datetime-local>local date and time</dfn>
+  consists of a specific Gregorian date, consisting of a year, a
+  month, and a day, and a time, consisting of an hour, a minute, a
+  second, and a fraction of a second, but expressed without a time
+  zone. <a href=#references>[GREGORIAN]</a><p>A string is a <dfn id=valid-local-date-and-time-string>valid local date and time string</dfn> if it
+  has the components in the following list, in the given order:<ol><li>A <a href=#valid-date-string>valid date string</a>.</li>
+
+   <li>A U+0054 LATIN CAPITAL LETTER T character.</li>
+
+   <li>A <a href=#valid-time-string>valid time string</a>.</li>
+
+  </ol><p>The rules to <dfn id=parse-a-local-date-and-time-string>parse a local date and time string</dfn> are as
+  follows. This will either return a date and time, or nothing. If at
+  any point the algorithm says that it "fails", this means that it is
+  aborted at that point and returns nothing.<ol><li><p>Let <var title="">input</var> be the string being
+   parsed.</li>
+
+   <li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
+   string.</li>
+
+   <li><p><a href=#parse-a-date-component>Parse a date component</a> to obtain <var title="">year</var>, <var title="">month</var>, and <var title="">day</var>. If this returns nothing, then fail.</p>
+
+   <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+0054 LATIN CAPITAL LETTER T
+   character then fail. Otherwise, move <var title="">position</var>
+   forwards one character.</li>
+
+   <li><p><a href=#parse-a-time-component>Parse a time component</a> to obtain <var title="">hour</var>, <var title="">minute</var>, and <var title="">second</var>. If this returns nothing, then fail.</p>
+
+   <li><p>If <var title="">position</var> is <em>not</em> beyond the
+   end of <var title="">input</var>, then fail.</li>
+
+   <li><p>Let <var title="">date</var> be the date with year <var title="">year</var>, month <var title="">month</var>, and day <var title="">day</var>.</li>
+
+   <li><p>Let <var title="">time</var> be the time with hour <var title="">hour</var>, minute <var title="">minute</var>, and second
+   <var title="">second</var>.</li>
+
+   <li><p>Return <var title="">date</var> and <var title="">time</var>.</li>
+
+  </ol><h5 id=global-dates-and-times><span class=secno>2.4.4.4 </span>Global dates and times</h5><p>A <dfn id=concept-datetime title=concept-datetime>global date and time</dfn>
+  consists of a specific Gregorian date, consisting of a year, a
+  month, and a day, and a time, consisting of an hour, a minute, a
+  second, and a fraction of a second, expressed with a time zone,
+  consisting of a number of hours and minutes. <a href=#references>[GREGORIAN]</a></p><!--XXX [GREGORIAN] should point to
+  <dd id="refsGREGORIAN">[GREGORIAN]</dd>
+  <dd>(Non-normative) <cite>Inter Gravissimas</cite>, A. Lilius, C. Clavius. Gregory XIII Papal Bulls, February 1582.</dd>
+  --><p>A string is a <dfn id=valid-global-date-and-time-string>valid global date and time string</dfn> if it
+  has the components in the following list, in the given order, and if
+  the components in the list follow the constraints given after the
+  list:<ol><li>A <a href=#valid-date-string>valid date string</a>.</li>
+
+   <li>A U+0054 LATIN CAPITAL LETTER T character.</li>
+
+   <li>A <a href=#valid-time-string>valid time string</a>.</li>
+
    <li>Either:
 
     <ul><li>A U+005A LATIN CAPITAL LETTER Z character (indicating the
@@ -2285,36 +2502,17 @@
        HYPHEN-MINUS (-) character (the sign of the timezone
        offset)</li>
 
-       <li>Two digits (representing the hours component of the timezone offset)</li>
+       <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the hours component of the timezone offset)</li>
 
        <li>A U+003A COLON character (:).</li>
 
-       <li>Two digits (representing the minutes component of the timezone offset)</li>
+       <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a> (representing the minutes component of the timezone offset)</li>
 
       </ol></li>
 
     </ul></li>
 
-  </ol><p>The aforementioned constraints are:<ul><li>The month <var title="">m</var> must be in the range
-   0&nbsp;&le;&nbsp;<var title="">m</var>&nbsp;&le;&nbsp;12.</li>
-
-   <li>The day <var title="">d</var> must be in the range
-   0&nbsp;&le;&nbsp;<var title="">d</var>&nbsp;&le;&nbsp;<var title="">D</var> where <var title="">D</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
-   in the given month and year</a>.</li>
-
-   <li>The hour <var title="">h</var> must be in the range
-   0&nbsp;&le;&nbsp;<var title="">h</var>&nbsp;&le;&nbsp;23.</li>
-
-   <li>The minute <var title="">m</var> must be in the range
-   0&nbsp;&le;&nbsp;<var title="">m</var>&nbsp;&le;&nbsp;59.</li>
-
-   <li>If present, the second <var title="">s</var> (consisting of the
-   integer part and its fractional part) must be in the range
-   0&nbsp;&le;&nbsp;<var title="">s</var>&nbsp;&lt;&nbsp;60.  (The
-   values 60 and 61 are not allowed: leap seconds cannot be
-   represented by datetime values.)</li>
-
-   <li>If present, the time zone hour <var title="">h</var> must be in
+  </ol><p>The aforementioned constraints are:<ul><li>If present, the time zone hour <var title="">h</var> must be in
    the range 0&nbsp;&le;&nbsp;<var title="">h</var>&nbsp;&le;&nbsp;23. (However, in practice, time
    zones do not currently ever have an hour component greater than
    14.)</li>
@@ -2324,8 +2522,7 @@
    zones do not currently ever have a minute component other than 0, 30,
    or 45.)</li>
 
-  </ul><p>The digits must be characters in the range U+0030 DIGIT ZERO to
-  U+0039 DIGIT NINE, used to express numbers in base ten.<div class=example>
+  </ul><div class=example>
 
    <p>The following are some examples of dates written as <a href=#valid-global-date-and-time-string title="valid global date and time string">valid global date and
    time strings</a>.</p>
@@ -2380,104 +2577,13 @@
    <li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
    string.</li>
 
-   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
-   sequence is not at least four characters long, then
-   fail. Otherwise, interpret the resulting sequence as a base-ten
-   integer. Let that number be the <var title="">year</var>.</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 U+002D HYPHEN-MINUS character,
-   then fail. Otherwise, move <var title="">position</var> forwards
-   one character.</li>
-
-   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
-   sequence is not exactly two characters long, then fail. Otherwise,
-   interpret the resulting sequence as a base-ten integer. Let that
-   number be the <var title="">month</var>.</li>
-
-   <li>If <var title="">month</var> is not a number in the range
-   1&nbsp;&le;&nbsp;<var title="">month</var>&nbsp;&le;&nbsp;12, then
-   fail.</li>
-
-   <li><p>Let <var title="">maxday</var> be the <a href=#number-of-days-in-month-month-of-year-year>number of days
-   in month <var title="">month</var> of year <var title="">year</var></a>.</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 U+002D HYPHEN-MINUS character,
-   then fail. Otherwise, move <var title="">position</var> forwards
-   one character.</li>
-
-   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
-   sequence is not exactly two characters long, then fail. Otherwise,
-   interpret the resulting sequence as a base-ten integer. Let that
-   number be the <var title="">day</var>.</li>
-
-   <li><p>If <var title="">day</var> is not a number in the range
-   1&nbsp;&le;&nbsp;<var title="">month</var>&nbsp;&le;&nbsp;<var title="">maxday</var>, then fail.</li>
+   <li><p><a href=#parse-a-date-component>Parse a date component</a> to obtain <var title="">year</var>, <var title="">month</var>, and <var title="">day</var>. If this returns nothing, then fail.</p>
 
    <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+0054 LATIN CAPITAL LETTER T
    character then fail. Otherwise, move <var title="">position</var>
    forwards one character.</li>
 
-   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
-   sequence is not exactly two characters long, then fail. Otherwise,
-   interpret the resulting sequence as a base-ten integer. Let that
-   number be the <var title="">hour</var>.</li>
-
-   <li>If <var title="">hour</var> is not a number in the range
-   0&nbsp;&le;&nbsp;<var title="">hour</var>&nbsp;&le;&nbsp;23, then
-   fail.</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 U+003A COLON character, then
-   fail. Otherwise, move <var title="">position</var> forwards one
-   character.</li>
-
-   <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
-   U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). If the collected
-   sequence is not exactly two characters long, then fail. Otherwise,
-   interpret the resulting sequence as a base-ten integer. Let that
-   number be the <var title="">minute</var>.</li>
-
-   <li>If <var title="">minute</var> is not a number in the range
-   0&nbsp;&le;&nbsp;<var title="">minute</var>&nbsp;&le;&nbsp;59, then
-   fail.</li>
-
-   <li><p>Let <var title="">second</var> be a string with the value
-   "0".</li>
-
-   <li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, then fail.</li>
-
-   <li>
-
-    <p>If the character at <var title="">position</var> is a U+003A
-    COLON, then run these substeps:</p>
-
-    <ol><li><p>Advance <var title="">position</var> to the next character
-     in <var title="">input</var>.</li>
-
-     <li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, or at the last character in <var title="">input</var>, or if the next <em>two</em> characters in
-     <var title="">input</var> starting at <var title="">position</var> are not two characters both in the range
-     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then
-     fail.</li>
-
-     <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
-     either characters in the range U+0030 DIGIT ZERO (0) to U+0039
-     DIGIT NINE (9) or U+002E FULL STOP characters. If the collected
-     sequence has more than one U+002E FULL STOP characters, or if the
-     last character in the sequence is a U+002E FULL STOP character,
-     then fail. Otherwise, let the collected string be <var title="">second</var> instead of its previous value.</li>
-
-    </ol></li>
-
-   <li><p>Interpret <var title="">second</var> as a base-ten number
-   (possibly with a fractional part). Let <var title="">second</var>
-   be that number instead of the string version.</li>
-
-   <li>If <var title="">second</var> is not a number in the range
-   0&nbsp;&le;&nbsp;<var title="">second</var>&nbsp;&lt;&nbsp;60, then
-   fail.</li>
+   <li><p><a href=#parse-a-time-component>Parse a time component</a> to obtain <var title="">hour</var>, <var title="">minute</var>, and <var title="">second</var>. If this returns nothing, then fail.</p>
 
    <li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, then fail.</li>
 
@@ -2548,19 +2654,11 @@
 
    <li><p>Return <var title="">time</var> and <var title="">timezone</var>.</li>
 
-  </ol><h5 id=local-dates-and-times><span class=secno>2.4.4.2 </span>Local dates and times</h5><p>A <dfn id=concept-datetime-local title=concept-datetime-local>local date and time</dfn>
-  consists of a specific Gregorian date with no timezone information,
-  consisting of a year, a month, a day, an hour, a minute, a second,
-  and a fraction of a second. <a href=#references>[GREGORIAN]</a><p class=XXX>... <dfn id=valid-local-date-and-time-string>valid local date and time string</dfn><p class=XXX>... rules to <dfn id=parse-a-local-date-and-time-string>parse a local date and time
-  string</dfn><h5 id=dates><span class=secno>2.4.4.3 </span>Dates</h5><p>A <dfn id=concept-date title=concept-date>date</dfn> consists of a specific
-  Gregorian date with no timezone information, consisting of a year, a
-  month, and a day. <a href=#references>[GREGORIAN]</a><p class=XXX>... <dfn id=valid-date-string>valid date string</dfn><p class=XXX>... rules to <dfn id=parse-a-date-string>parse a date string</dfn><h5 id=months><span class=secno>2.4.4.4 </span>Months</h5><p>A <dfn id=concept-month title=concept-month>month</dfn> consists of a specific
+  </ol><h5 id=months><span class=secno>2.4.4.5 </span>Months</h5><p>A <dfn id=concept-month title=concept-month>month</dfn> consists of a specific
   Gregorian date with no timezone information and no date information
-  beyond a year and a month. <a href=#references>[GREGORIAN]</a><p class=XXX>... <dfn id=valid-month-string>valid month string</dfn><p class=XXX>... rules to <dfn id=parse-a-month-string>parse a month string</dfn><h5 id=weeks><span class=secno>2.4.4.5 </span>Weeks</h5><p>A <dfn id=concept-week title=concept-week>week</dfn> consists of a specific
+  beyond a year and a month. <a href=#references>[GREGORIAN]</a><p class=XXX>... <dfn id=valid-month-string>valid month string</dfn><p class=XXX>... rules to <dfn id=parse-a-month-string>parse a month string</dfn><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=#references>[GREGORIAN]</a></p><!-- XXX ISO week information --><p class=XXX>... <dfn id=valid-week-string>valid week string</dfn><p class=XXX>... rules to <dfn id=parse-a-week-string>parse a week string</dfn><h5 id=times><span class=secno>2.4.4.6 </span>Times</h5><p>A <dfn id=concept-time title=concept-time>time</dfn> consists of a specific
-  time with no timezone information, consisting of an hour, a minute,
-  a second, and a fraction of a second.<p class=XXX>... <dfn id=valid-time-string>valid time string</dfn><p class=XXX>... rules to <dfn id=parse-a-time-string>parse a time string</dfn><h5 id=vaguer-moments-in-time><span class=secno>2.4.4.7 </span>Vaguer moments in time</h5><p>This section defines <dfn id=date-or-time-string title="date or time string">date or
+  beyond a year and a week. <a href=#references>[GREGORIAN]</a></p><!-- XXX ISO week information --><p class=XXX>... <dfn id=valid-week-string>valid week string</dfn><p class=XXX>... rules to <dfn id=parse-a-week-string>parse a week string</dfn><h5 id=vaguer-moments-in-time><span class=secno>2.4.4.7 </span>Vaguer moments in time</h5><p>This section defines <dfn id=date-or-time-string title="date or time string">date or
   time strings</dfn>. There are two kinds, <dfn id=date-or-time-string-in-content title="date or time
   string in content">date or time strings in content</dfn>, and <dfn id=date-or-time-string-in-attributes title="date or time string in attributes">date or time strings in
   attributes</dfn>. The only difference is in the handling of
Received on Thursday, 30 October 2008 00:58:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 30 October 2008 00:58:31 GMT