- From: poot <cvsmail@w3.org>
- Date: Thu, 30 Oct 2008 10:59:40 +0900 (JST)
- To: public-html-diffs@w3.org
Define 'week' syntax. Details coming later. (whatwg r2384) 2.4.4.7 Vaguer moments in time http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#vaguer-moments-in-time parse a time component http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#parse-a-time-component parse a week string http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#parse-a-week-string valid week string http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#valid-week-string week number http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#week-number date or time strings in attributes http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#date-or-time-string-in-attributes parse a month component http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#parse-a-month-component parse a global date and time string http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#parse-a-global-date-and-time-string date or time strings in content http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#date-or-time-string-in-content 2.4.4.6 Weeks http://people.w3.org/mike/diffs/html5/spec/Overview.1.1556.html#weeks http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1555&r2=1.1556&f=h http://html5.org/tools/web-apps-tracker?from=2383&to=2384 =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1555 retrieving revision 1.1556 diff -u -d -r1.1555 -r1.1556 --- Overview.html 30 Oct 2008 01:39:29 -0000 1.1555 +++ Overview.html 30 Oct 2008 01:56:38 -0000 1.1556 @@ -2281,7 +2281,7 @@ 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 + <li><p>If <var title="">month</var> is not a number in the range 1 ≤ <var title="">month</var> ≤ 12, then fail.</li> @@ -2456,7 +2456,7 @@ (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 + <li><p>If <var title="">second</var> is not a number in the range 0 ≤ <var title="">second</var> < 60, then fail.</li> @@ -2679,7 +2679,60 @@ </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=#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 + beyond a year and a week. <a href=#references>[GREGORIAN]</a></p><!-- XXX ISO week information --><p class=XXX>The <dfn id=week-number>week number</dfn> of a day is ...<p class=XXX>The <dfn id=week-number-of-the-last-day>week number of the last day</dfn> of a year ...<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:<ol><li>Four or more <a href=#concept-datetime-digit title=concept-datetime-digit>digits</a>, representing <var title="">year</var></li> + + <li>A U+002D HYPHEN-MINUS character (-)</li> + + <li>A U+0057 LATIN CAPITAL LETTER W character</li> + + <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> + + </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.<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=#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>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 + 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="">week</var>.</li> + + <li><p>Let <var title="">maxweek</var> be the <a href=#week-number-of-the-last-day>week number of + the last day</a> of year <var title="">year</var>.</li> + + <li><p>If <var title="">week</var> is not a number in the range + 1 ≤ <var title="">week</var> ≤ <var title="">maxweek</var>, then fail.</li> + + <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> + + </ol><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 02:00:18 UTC