Permalink
Browse files

[c] (0) Ban year zero. (credit: hs)

git-svn-id: http://svn.whatwg.org/webapps@2433 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 2913be0 commit ce040d08f19e854251defa5f446b6d027a326af0 @Hixie Hixie committed Nov 25, 2008
Showing with 18 additions and 4 deletions.
  1. +8 −2 index
  2. +10 −2 source
View
10 index
@@ -2741,7 +2741,7 @@
<var title="">year</var> and month <var title="">month</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>
+ <ol><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var>, where <var title="">year</var>&nbsp;&gt;&nbsp;0</li>
<li>A U+002D HYPHEN-MINUS character (-)</li>
@@ -2779,6 +2779,9 @@
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="">year</var> is not a number greater than
+ zero, 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+002D HYPHEN-MINUS character,
then fail. Otherwise, move <var title="">position</var> forwards
one character.</li>
@@ -3261,7 +3264,7 @@
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>
+ <ol><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var>, where <var title="">year</var>&nbsp;&gt;&nbsp;0</li>
<li>A U+002D HYPHEN-MINUS character (-)</li>
@@ -3289,6 +3292,9 @@
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="">year</var> is not a number greater than
+ zero, 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+002D HYPHEN-MINUS character,
then fail. Otherwise, move <var title="">position</var> forwards
one character.</li>
View
12 source
@@ -2010,7 +2010,8 @@
<li>Four or more <span
title="concept-datetime-digit">digits</span>, representing <var
- title="">year</var></li>
+ title="">year</var>, where <var
+ title="">year</var>&nbsp;&gt;&nbsp;0</li>
<li>A U+002D HYPHEN-MINUS character (-)</li>
@@ -2061,6 +2062,9 @@
fail. Otherwise, interpret the resulting sequence as a base-ten
integer. Let that number be the <var title="">year</var>.</p></li>
+ <li><p>If <var title="">year</var> is not a number greater than
+ zero, then fail.</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+002D HYPHEN-MINUS character,
@@ -2706,7 +2710,8 @@
<li>Four or more <span
title="concept-datetime-digit">digits</span>, representing <var
- title="">year</var></li>
+ title="">year</var>, where <var
+ title="">year</var>&nbsp;&gt;&nbsp;0</li>
<li>A U+002D HYPHEN-MINUS character (-)</li>
@@ -2741,6 +2746,9 @@
fail. Otherwise, interpret the resulting sequence as a base-ten
integer. Let that number be the <var title="">year</var>.</p></li>
+ <li><p>If <var title="">year</var> is not a number greater than
+ zero, then fail.</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+002D HYPHEN-MINUS character,

0 comments on commit ce040d0

Please sign in to comment.