[html5] r6829 - [acgiowt] (1) extend timezone format to also allow omitting the colon

whatwg at whatwg.org whatwg at whatwg.org
Fri Nov 18 15:22:51 PST 2011


Author: ianh
Date: 2011-11-18 15:22:50 -0800 (Fri, 18 Nov 2011)
New Revision: 6829

Modified:
   complete.html
   index
   source
Log:
[acgiowt] (1) extend timezone format to also allow omitting the colon

Modified: complete.html
===================================================================
--- complete.html	2011-11-18 20:23:25 UTC (rev 6828)
+++ complete.html	2011-11-18 23:22:50 UTC (rev 6829)
@@ -5936,7 +5936,7 @@
      representing the hours component <var title="">hour</var> of
      the time-zone offset, in the range 0 ≤ <var title="">hour</var> ≤ 23</li>
 
-     <li>A U+003A COLON character (:)</li>
+     <li>Optionally, a U+003A COLON character (:)</li>
 
      <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
      representing the minutes component <var title="">minute</var>
@@ -6007,26 +6007,45 @@
      in <var title="">input</var>.</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="">timezone<sub title="">hours</sub></var>.</li>
+     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Let <var title="">s</var> be the collected sequence.</li>
 
+     <li>
+
+      <p>If <var title="">s</var> is exactly two characters long, then
+      run these substeps:</p>
+
+      <ol><li><p>Interpret <var title="">s</var> as a base-ten integer.
+       Let that number be the <var title="">timezone<sub title="">hours</sub></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+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="">timezone<sub title="">minutes</sub></var>.</li>
+
+      </ol><p>If <var title="">s</var> is exactly four characters long,
+      then run these substeps:</p>
+
+      <ol><li><p>Interpret the first two characters of <var title="">s</var> as a base-ten integer. Let that number be the
+       <var title="">timezone<sub title="">hours</sub></var>.</li>
+
+       <li><p>Interpret the last two characters of <var title="">s</var> as a base-ten integer. Let that number be the
+       <var title="">timezone<sub title="">minutes</sub></var>.</li>
+
+      </ol><p>Otherwise, fail.</p>
+
+     </li>
+
      <li>If <var title="">timezone<sub title="">hours</sub></var> is
      not a number in the range 0 ≤ <var title="">timezone<sub title="">hours</sub></var> ≤ 23, then fail.</li>
 
      <li>If <var title="">sign</var> is "negative", then negate <var title="">timezone<sub title="">hours</sub></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+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="">timezone<sub title="">minutes</sub></var>.</li>
-
      <li>If <var title="">timezone<sub title="">minutes</sub></var> is
      not a number in the range 0 ≤ <var title="">timezone<sub title="">minutes</sub></var> ≤ 59, then fail.</li>
 
@@ -21171,7 +21190,9 @@
    <dd>
 
     <pre class=example><time>Z</time></pre>
+    <pre class=example><time>+0000</time></pre>
     <pre class=example><time>+00:00</time></pre>
+    <pre class=example><time>-0800</time></pre>
     <pre class=example><time>-08:00</time></pre>
 
    </dd>
@@ -21184,9 +21205,19 @@
     <pre class=example><time>2011-11-12T14:54Z</time></pre>
     <pre class=example><time>2011-11-12T14:54:39Z</time></pre>
     <pre class=example><time>2011-11-12T14:54:39.92922Z</time></pre>
+
+    <pre class=example><time>2011-11-12T14:54+0000</time></pre>
+    <pre class=example><time>2011-11-12T14:54:39+0000</time></pre>
+    <pre class=example><time>2011-11-12T14:54:39.92922+0000</time></pre> 
+
     <pre class=example><time>2011-11-12T14:54+00:00</time></pre>
     <pre class=example><time>2011-11-12T14:54:39+00:00</time></pre>
     <pre class=example><time>2011-11-12T14:54:39.92922+00:00</time></pre>
+
+    <pre class=example><time>2011-11-12T06:54-0800</time></pre>
+    <pre class=example><time>2011-11-12T06:54:39-0800</time></pre>
+    <pre class=example><time>2011-11-12T06:54:39.92922-0800</time></pre>
+
     <pre class=example><time>2011-11-12T06:54-08:00</time></pre>
     <pre class=example><time>2011-11-12T06:54:39-08:00</time></pre>
     <pre class=example><time>2011-11-12T06:54:39.92922-08:00</time></pre>

Modified: index
===================================================================
--- index	2011-11-18 20:23:25 UTC (rev 6828)
+++ index	2011-11-18 23:22:50 UTC (rev 6829)
@@ -5936,7 +5936,7 @@
      representing the hours component <var title="">hour</var> of
      the time-zone offset, in the range 0 ≤ <var title="">hour</var> ≤ 23</li>
 
-     <li>A U+003A COLON character (:)</li>
+     <li>Optionally, a U+003A COLON character (:)</li>
 
      <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
      representing the minutes component <var title="">minute</var>
@@ -6007,26 +6007,45 @@
      in <var title="">input</var>.</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="">timezone<sub title="">hours</sub></var>.</li>
+     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Let <var title="">s</var> be the collected sequence.</li>
 
+     <li>
+
+      <p>If <var title="">s</var> is exactly two characters long, then
+      run these substeps:</p>
+
+      <ol><li><p>Interpret <var title="">s</var> as a base-ten integer.
+       Let that number be the <var title="">timezone<sub title="">hours</sub></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+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="">timezone<sub title="">minutes</sub></var>.</li>
+
+      </ol><p>If <var title="">s</var> is exactly four characters long,
+      then run these substeps:</p>
+
+      <ol><li><p>Interpret the first two characters of <var title="">s</var> as a base-ten integer. Let that number be the
+       <var title="">timezone<sub title="">hours</sub></var>.</li>
+
+       <li><p>Interpret the last two characters of <var title="">s</var> as a base-ten integer. Let that number be the
+       <var title="">timezone<sub title="">minutes</sub></var>.</li>
+
+      </ol><p>Otherwise, fail.</p>
+
+     </li>
+
      <li>If <var title="">timezone<sub title="">hours</sub></var> is
      not a number in the range 0 ≤ <var title="">timezone<sub title="">hours</sub></var> ≤ 23, then fail.</li>
 
      <li>If <var title="">sign</var> is "negative", then negate <var title="">timezone<sub title="">hours</sub></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+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="">timezone<sub title="">minutes</sub></var>.</li>
-
      <li>If <var title="">timezone<sub title="">minutes</sub></var> is
      not a number in the range 0 ≤ <var title="">timezone<sub title="">minutes</sub></var> ≤ 59, then fail.</li>
 
@@ -21171,7 +21190,9 @@
    <dd>
 
     <pre class=example><time>Z</time></pre>
+    <pre class=example><time>+0000</time></pre>
     <pre class=example><time>+00:00</time></pre>
+    <pre class=example><time>-0800</time></pre>
     <pre class=example><time>-08:00</time></pre>
 
    </dd>
@@ -21184,9 +21205,19 @@
     <pre class=example><time>2011-11-12T14:54Z</time></pre>
     <pre class=example><time>2011-11-12T14:54:39Z</time></pre>
     <pre class=example><time>2011-11-12T14:54:39.92922Z</time></pre>
+
+    <pre class=example><time>2011-11-12T14:54+0000</time></pre>
+    <pre class=example><time>2011-11-12T14:54:39+0000</time></pre>
+    <pre class=example><time>2011-11-12T14:54:39.92922+0000</time></pre> 
+
     <pre class=example><time>2011-11-12T14:54+00:00</time></pre>
     <pre class=example><time>2011-11-12T14:54:39+00:00</time></pre>
     <pre class=example><time>2011-11-12T14:54:39.92922+00:00</time></pre>
+
+    <pre class=example><time>2011-11-12T06:54-0800</time></pre>
+    <pre class=example><time>2011-11-12T06:54:39-0800</time></pre>
+    <pre class=example><time>2011-11-12T06:54:39.92922-0800</time></pre>
+
     <pre class=example><time>2011-11-12T06:54-08:00</time></pre>
     <pre class=example><time>2011-11-12T06:54:39-08:00</time></pre>
     <pre class=example><time>2011-11-12T06:54:39.92922-08:00</time></pre>

Modified: source
===================================================================
--- source	2011-11-18 20:23:25 UTC (rev 6828)
+++ source	2011-11-18 23:22:50 UTC (rev 6829)
@@ -5346,7 +5346,7 @@
      the time-zone offset, in the range 0 ≤ <var
      title="">hour</var> ≤ 23</li>
 
-     <li>A U+003A COLON character (:)</li>
+     <li>Optionally, a U+003A COLON character (:)</li>
 
      <li>Two <span title="concept-datetime-digit">digits</span>,
      representing the minutes component <var title="">minute</var>
@@ -5442,12 +5442,55 @@
      in <var title="">input</var>.</p></li>
 
      <li><p><span>Collect a sequence of characters</span> 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="">timezone<sub
-     title="">hours</sub></var>.</p></li>
+     U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Let <var
+     title="">s</var> be the collected sequence.</p></li>
 
+     <li>
+
+      <p>If <var title="">s</var> is exactly two characters long, then
+      run these substeps:</p>
+
+      <ol>
+
+       <li><p>Interpret <var title="">s</var> as a base-ten integer.
+       Let that number be the <var title="">timezone<sub
+       title="">hours</sub></var>.</p></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.</p></li>
+
+       <li><p><span>Collect a sequence of characters</span> 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="">timezone<sub
+       title="">minutes</sub></var>.</p></li>
+
+      </ol>
+
+      <p>If <var title="">s</var> is exactly four characters long,
+      then run these substeps:</p>
+
+      <ol>
+
+       <li><p>Interpret the first two characters of <var
+       title="">s</var> as a base-ten integer. Let that number be the
+       <var title="">timezone<sub title="">hours</sub></var>.</p></li>
+
+       <li><p>Interpret the last two characters of <var
+       title="">s</var> as a base-ten integer. Let that number be the
+       <var title="">timezone<sub
+       title="">minutes</sub></var>.</p></li>
+
+      </ol>
+
+      <p>Otherwise, fail.</p>
+
+     </li>
+
      <li>If <var title="">timezone<sub title="">hours</sub></var> is
      not a number in the range 0 ≤ <var
      title="">timezone<sub
@@ -5456,19 +5499,6 @@
      <li>If <var title="">sign</var> is "negative", then negate <var
      title="">timezone<sub title="">hours</sub></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+003A COLON character, then
-     fail. Otherwise, move <var title="">position</var> forwards one
-     character.</p></li>
-
-     <li><p><span>Collect a sequence of characters</span> 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="">timezone<sub
-     title="">minutes</sub></var>.</p></li>
-
      <li>If <var title="">timezone<sub title="">minutes</sub></var> is
      not a number in the range 0 ≤ <var
      title="">timezone<sub
@@ -22660,7 +22690,9 @@
    <dd>
 
     <pre class="example"><time>Z</time></pre>
+    <pre class="example"><time>+0000</time></pre>
     <pre class="example"><time>+00:00</time></pre>
+    <pre class="example"><time>-0800</time></pre>
     <pre class="example"><time>-08:00</time></pre>
 
    </dd>
@@ -22673,9 +22705,19 @@
     <pre class="example"><time>2011-11-12T14:54Z</time></pre>
     <pre class="example"><time>2011-11-12T14:54:39Z</time></pre>
     <pre class="example"><time>2011-11-12T14:54:39.92922Z</time></pre>
+
+    <pre class="example"><time>2011-11-12T14:54+0000</time></pre>
+    <pre class="example"><time>2011-11-12T14:54:39+0000</time></pre>
+    <pre class="example"><time>2011-11-12T14:54:39.92922+0000</time></pre> 
+
     <pre class="example"><time>2011-11-12T14:54+00:00</time></pre>
     <pre class="example"><time>2011-11-12T14:54:39+00:00</time></pre>
     <pre class="example"><time>2011-11-12T14:54:39.92922+00:00</time></pre>
+
+    <pre class="example"><time>2011-11-12T06:54-0800</time></pre>
+    <pre class="example"><time>2011-11-12T06:54:39-0800</time></pre>
+    <pre class="example"><time>2011-11-12T06:54:39.92922-0800</time></pre>
+
     <pre class="example"><time>2011-11-12T06:54-08:00</time></pre>
     <pre class="example"><time>2011-11-12T06:54:39-08:00</time></pre>
     <pre class="example"><time>2011-11-12T06:54:39.92922-08:00</time></pre>




More information about the Commit-Watchers mailing list