[html5] r2610 - [e] (0) Define what numbers actually mean. Fix ranges in the date microsyntaxes.

whatwg at whatwg.org whatwg at whatwg.org
Mon Dec 29 04:58:38 PST 2008


Author: ianh
Date: 2008-12-29 04:58:37 -0800 (Mon, 29 Dec 2008)
New Revision: 2610

Modified:
   index
   source
Log:
[e] (0) Define what numbers actually mean. Fix ranges in the date microsyntaxes.

Modified: index
===================================================================
--- index	2008-12-29 12:00:31 UTC (rev 2609)
+++ index	2008-12-29 12:58:37 UTC (rev 2610)
@@ -2088,6 +2088,9 @@
   consists of one of more characters in the range U+0030 DIGIT ZERO
   (0) to U+0039 DIGIT NINE (9).</p>
 
+  <p>A <a href=#valid-non-negative-integer>valid non-negative integer</a> represents the number
+  that is represented in base ten by that string of digits.</p>
+
   <p>The <dfn id=rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</dfn> are as
   given in the following algorithm. When invoked, the steps must be
   followed in the order given, aborting at the first step that returns
@@ -2141,6 +2144,13 @@
   NINE (9), optionally prefixed with a U+002D HYPHEN-MINUS ("-")
   character.</p>
 
+  <p>A <a href=#valid-integer>valid integer</a> without a U+002D HYPHEN-MINUS ("-")
+  prefix represents the number that is represented in base ten by that
+  string of digits. A <a href=#valid-integer>valid integer</a> <em>with</em> a
+  U+002D HYPHEN-MINUS ("-") prefix represents the <em>negative</em>
+  number represented in base ten by the string of digits that follows
+  the U+002D HYPHEN-MINUS.</p>
+
   <p>The <dfn id=rules-for-parsing-integers>rules for parsing integers</dfn> are similar to the
   <a href=#rules-for-parsing-non-negative-integers title="rules for parsing non-negative integers">rules for
   non-negative integers</a>, and are as given in the following
@@ -2237,7 +2247,18 @@
 
     </ol></li>
 
-  </ol><p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
+  </ol><p>A <a href=#valid-floating-point-number>valid floating point number</a> represents the number
+  obtained by multiplying the significand by ten raised to the power
+  of the exponent, where the significand is the first number,
+  interpreted as base ten (including the decimal point and the number
+  after the decimal point, if any, and interpreting the significand as
+  a negative number if the whole string starts with a U+002D
+  HYPHEN-MINUS ("-") character), and where the exponent is the number
+  after the E, if any (interpreted as a negative number if there is a
+  U+002D HYPHEN-MINUS ("-") character between the E and the
+  number). If there is no E, then the exponent is treated as zero.</p>
+
+  <p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
   as given in the following algorithm. As with the previous
   algorithms, when this one is invoked, the steps must be followed in
   the order given, aborting at the first step that returns
@@ -2447,7 +2468,7 @@
    <li>Otherwise, return <var title="">number1</var> and
    <var title="">number2</var>.</li>
 
-  </ol><!-- XXX again, this should say "positive number" --><p>The algorithm to <dfn id=find-a-number>find a number</dfn> is as follows. It is
+  </ol><p>The algorithm to <dfn id=find-a-number>find a number</dfn> is as follows. It is
   given a string and a starting position, and returns either nothing,
   a number, or an error condition.</p>
 
@@ -2774,7 +2795,7 @@
 
    <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
    representing the month <var title="">month</var>, in the range
-   0 ≤ <var title="">month</var> ≤ 12</li>
+   1 ≤ <var title="">month</var> ≤ 12</li>
 
   </ol><p>The rules to <dfn id=parse-a-month-string>parse a month string</dfn> are as follows. This
   will either return a year and month, or nothing. If at any point the
@@ -2842,7 +2863,7 @@
 
    <li>Two <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>,
    representing <var title="">day</var>, in the range
-   0 ≤ <var title="">day</var> ≤ <var title="">maxday</var> where <var title="">maxday</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
+   1 ≤ <var title="">day</var> ≤ <var title="">maxday</var> where <var title="">maxday</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 month <var title="">month</var> and year <var title="">year</var></a></li>
 
   </ol><p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This

Modified: source
===================================================================
--- source	2008-12-29 12:00:31 UTC (rev 2609)
+++ source	2008-12-29 12:58:37 UTC (rev 2610)
@@ -1163,6 +1163,9 @@
   consists of one of more characters in the range U+0030 DIGIT ZERO
   (0) to U+0039 DIGIT NINE (9).</p>
 
+  <p>A <span>valid non-negative integer</span> represents the number
+  that is represented in base ten by that string of digits.</p>
+
   <p>The <dfn>rules for parsing non-negative integers</dfn> are as
   given in the following algorithm. When invoked, the steps must be
   followed in the order given, aborting at the first step that returns
@@ -1229,6 +1232,13 @@
   NINE (9), optionally prefixed with a U+002D HYPHEN-MINUS ("-")
   character.</p>
 
+  <p>A <span>valid integer</span> without a U+002D HYPHEN-MINUS ("-")
+  prefix represents the number that is represented in base ten by that
+  string of digits. A <span>valid integer</span> <em>with</em> a
+  U+002D HYPHEN-MINUS ("-") prefix represents the <em>negative</em>
+  number represented in base ten by the string of digits that follows
+  the U+002D HYPHEN-MINUS.</p>
+
   <p>The <dfn>rules for parsing integers</dfn> are similar to the
   <span title="rules for parsing non-negative integers">rules for
   non-negative integers</span>, and are as given in the following
@@ -1357,6 +1367,17 @@
 
   </ol>
 
+  <p>A <span>valid floating point number</span> represents the number
+  obtained by multiplying the significand by ten raised to the power
+  of the exponent, where the significand is the first number,
+  interpreted as base ten (including the decimal point and the number
+  after the decimal point, if any, and interpreting the significand as
+  a negative number if the whole string starts with a U+002D
+  HYPHEN-MINUS ("-") character), and where the exponent is the number
+  after the E, if any (interpreted as a negative number if there is a
+  U+002D HYPHEN-MINUS ("-") character between the E and the
+  number). If there is no E, then the exponent is treated as zero.</p>
+
   <p>The <dfn>rules for parsing floating point number values</dfn> are
   as given in the following algorithm. As with the previous
   algorithms, when this one is invoked, the steps must be followed in
@@ -1627,7 +1648,6 @@
 
   </ol>
 
-  <!-- XXX again, this should say "positive number" -->
   <p>The algorithm to <dfn>find a number</dfn> is as follows. It is
   given a string and a starting position, and returns either nothing,
   a number, or an error condition.</p>
@@ -2019,7 +2039,7 @@
 
    <li>Two <span title="concept-datetime-digit">digits</span>,
    representing the month <var title="">month</var>, in the range
-   0 ≤ <var
+   1 ≤ <var
    title="">month</var> ≤ 12</li>
 
   </ol>
@@ -2110,7 +2130,7 @@
 
    <li>Two <span title="concept-datetime-digit">digits</span>,
    representing <var title="">day</var>, in the range
-   0 ≤ <var title="">day</var> ≤ <var
+   1 ≤ <var title="">day</var> ≤ <var
    title="">maxday</var> where <var title="">maxday</var> is the <span
    title="number of days in month month of year year">number of days
    in the month <var title="">month</var> and year <var




More information about the Commit-Watchers mailing list