Permalink
Browse files

[acgiowt] (2) Update the date-and-time microsyntaxes to support havin…

…g the 'T' replaced by a single space. (Note: multiple spaces are invalid and will cause parse failures. Only a single space is supported.) Based on proposal and implementation evidence from Tantek documented at http://wiki.whatwg.org/wiki/Time_element#permit_space_instead_of_T_in_datetimes

Affected topics: HTML, Microdata

git-svn-id: http://svn.whatwg.org/webapps@6845 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent cf1b046 commit b0b3270a2a3f46c15b034b3d4bcc4ca9abe1e191 @Hixie Hixie committed Dec 6, 2011
Showing with 284 additions and 184 deletions.
  1. +93 −61 complete.html
  2. +93 −61 index
  3. +98 −62 source
View
154 complete.html
@@ -240,7 +240,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 5 December 2011</h2>
+ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 December 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -5856,11 +5856,21 @@ <h5 id=local-dates-and-times><span class=secno>2.5.5.5 </span>Local dates and ti
representing a date and time if it consists of the following
components in the given order:</p>
- <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date.</li>
+ <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
+
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T) or a U+0020 SPACE character</li>
+
+ <li>A <a href=#valid-time-string>valid time string</a> representing the time</li>
+
+ </ol><p>A string is a <dfn id=valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</dfn> representing a date and time if it consists of the
+ following components in the given order:</p>
- <li>A U+0054 LATIN CAPITAL LETTER T character (T).</li>
+ <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
+
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>
- <li>A <a href=#valid-time-string>valid time string</a> representing the time.</li>
+ <li>A <a href=#valid-time-string>valid time string</a> representing the time, expressed as the shortest possible string for the given time (e.g. omitting the seconds component entirely if the given time is zero seconds past the minute)</li>
</ol><div class=impl>
@@ -5877,8 +5887,9 @@ <h5 id=local-dates-and-times><span class=secno>2.5.5.5 </span>Local dates and ti
<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 (T) 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 neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE 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>
@@ -6061,7 +6072,7 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.7 </span>Global dates and
<ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
- <li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T) or a U+0020 SPACE character</li>
<li>A <a href=#valid-time-string>valid time string</a> representing the time</li>
@@ -6081,7 +6092,7 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.7 </span>Global dates and
<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>
- <dl><dt>"<code>0037-12-13T00:00Z</code>"</dt>
+ <dl><dt>"<code>0037-12-13 00:00Z</code>"</dt>
<dd>Midnight in areas using London time on the birthday of Nero
(the Roman Emperor). See below for further discussion on which
@@ -6105,6 +6116,10 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.7 </span>Global dates and
<ul><li>Years with fewer than four digits have to be
zero-padded. The date "37-12-13" would not be a valid date.</li>
+ <li>If the "<code title="">T</code>" is replaced by a space, it
+ must be a single space character. The string "<code title="">2001-12-21&nbsp;&nbsp;12:00Z</code>" (with two spaces
+ between the components) would not be parsed successfully.</li>
+
<li>To unambiguously identify a moment in time prior to the
introduction of the Gregorian calendar (insofar as moments in time
before the formation of UTC can be unambiguously identified), the
@@ -6131,7 +6146,7 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.7 </span>Global dates and
</ul></div>
- <p>A string is a <dfn id=valid-forced-utc-global-date-and-time-string>valid forced-UTC global date and time
+ <p>A string is a <dfn id=valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC global date and time
string</dfn> representing a date, time, and a time-zone offset if it
consists of the following components in the given order:</p>
@@ -6145,15 +6160,6 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.7 </span>Global dates and
</ol><div class=impl>
- <p>The <dfn id=best-representation-of-the-global-date-and-time-string>best representation of the global date and time
- string</dfn> <var title="">datetime</var> is the <a href=#valid-global-date-and-time-string>valid global
- date and time string</a> representing <var title="">datetime</var>, with the <a href=#valid-time-string>valid time string</a>
- component being given in its shortest possible form, with the last
- character of the string not being a U+005A LATIN CAPITAL LETTER Z
- character (Z), even if the time zone is UTC, and with a U+002B PLUS
- SIGN character (+) representing the sign of the time-zone offset
- when the time zone is UTC.</p>
-
<p>The rules to <dfn id=parse-a-global-date-and-time-string>parse a global date and time string</dfn> are
as follows. This will return either a time in UTC, with associated
time-zone offset information for round-tripping or display purposes,
@@ -6168,8 +6174,9 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.7 </span>Global dates and
<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 (T) 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 neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE 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>
@@ -6691,9 +6698,9 @@ <h5 id=vaguer-moments-in-time><span class=secno>2.5.5.10 </span>Vaguer moments i
<p>A string is a <dfn id=valid-date-string-with-optional-time>valid date string with optional time</dfn> if
it is also one of the following:</p>
- <ul><li>A <a href=#valid-date-string>valid date string</a>.</li>
+ <ul><li>A <a href=#valid-date-string>valid date string</a></li>
- <li>A <a href=#valid-global-date-and-time-string>valid global date and time string</a>.</li>
+ <li>A <a href=#valid-global-date-and-time-string>valid global date and time string</a></li>
</ul><div class=impl>
@@ -6718,14 +6725,12 @@ <h5 id=vaguer-moments-in-time><span class=secno>2.5.5.10 </span>Vaguer moments i
<li>
- <p>If <var title="">date present</var> is true, and <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+0054 LATIN CAPITAL LETTER T
- character (T), then advance <var title="">position</var> to the
- next character in <var title="">input</var>.</p>
+ <p>If <var title="">date present</var> is true, and <var title="">position</var> is not beyond the end of <var title="">input</var>, and the character at <var title="">position</var> is either a U+0054 LATIN CAPITAL LETTER T
+ character (T) or a U+0020 SPACE character, then advance <var title="">position</var> to the next character in <var title="">input</var>.</p>
<p>Otherwise, if <var title="">date present</var> is true, and
- either <var title="">position</var> is beyond the end of <var title="">input</var> or the character at <var title="">position</var> is not a U+0054 LATIN CAPITAL LETTER T
- character (T), then set <var title="">time present</var> to
- false.</p>
+ either <var title="">position</var> is beyond the end of <var title="">input</var> or the character at <var title="">position</var> is neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE character, then set <var title="">time present</var> to false.</p>
<p>Otherwise, if <var title="">date present</var> is false, set
<var title="">position</var> back to the same position as <var title="">start position</var>.</p>
@@ -21186,6 +21191,9 @@ <h4 id=the-time-element><span class=secno>4.6.11 </span>The <dfn><code>time</cod
<pre class=example>&lt;time&gt;2011-11-12T14:54&lt;/time&gt;</pre>
<pre class=example>&lt;time&gt;2011-11-12T14:54:39&lt;/time&gt;</pre>
<pre class=example>&lt;time&gt;2011-11-12T14:54:39.92922&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922&lt;/time&gt;</pre>
</dd>
@@ -21227,6 +21235,26 @@ <h4 id=the-time-element><span class=secno>4.6.11 </span>The <dfn><code>time</cod
<pre class=example>&lt;time&gt;2011-11-12T06:54:39-08:00&lt;/time&gt;</pre>
<pre class=example>&lt;time&gt;2011-11-12T06:54:39.92922-08:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54Z&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39Z&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922Z&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 14:54+0000&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39+0000&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922+0000&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 14:54+00:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39+00:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922+00:00&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 06:54-0800&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39-0800&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39.92922-0800&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 06:54-08:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39-08:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39.92922-08:00&lt;/time&gt;</pre>
+
</dd>
@@ -22659,11 +22687,11 @@ <h4 id=the-ins-element><span class=secno>4.7.1 </span>The <dfn><code>ins</code><
<pre class=bad>&lt;aside&gt;
&lt;!-- don't do this --&gt;
- &lt;ins datetime="2005-03-16T00:00Z"&gt;
+ &lt;ins datetime="2005-03-16 00:00Z"&gt;
&lt;p&gt; I like fruit. &lt;/p&gt;
Apples are &lt;em&gt;tasty&lt;/em&gt;.
&lt;/ins&gt;
- &lt;ins datetime="2007-12-19T00:00Z"&gt;
+ &lt;ins datetime="2007-12-19 00:00Z"&gt;
So are pears.
&lt;/ins&gt;
&lt;/aside&gt;</pre>
@@ -22672,13 +22700,13 @@ <h4 id=the-ins-element><span class=secno>4.7.1 </span>The <dfn><code>ins</code><
but none of the elements cross implied paragraph boundaries.</p>
<pre>&lt;aside&gt;
- &lt;ins datetime="2005-03-16T00:00Z"&gt;
+ &lt;ins datetime="2005-03-16 00:00Z"&gt;
&lt;p&gt; I like fruit. &lt;/p&gt;
&lt;/ins&gt;
- &lt;ins datetime="2005-03-16T00:00Z"&gt;
+ &lt;ins datetime="2005-03-16 00:00Z"&gt;
Apples are &lt;em&gt;tasty&lt;/em&gt;.
&lt;/ins&gt;
- &lt;ins datetime="2007-12-19T00:00Z"&gt;
+ &lt;ins datetime="2007-12-19 00:00Z"&gt;
So are pears.
&lt;/ins&gt;
&lt;/aside&gt;</pre>
@@ -22935,11 +22963,11 @@ <h4 id=edits-and-tables><span class=secno>4.7.6 </span>Edits and tables</h4>
<pre>&lt;table&gt;
&lt;thead&gt;
- &lt;tr&gt; &lt;th&gt; Game name &lt;th&gt; Game publisher &lt;th&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;Verdict&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;th&gt; Game name &lt;th&gt; Game publisher &lt;th&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;Verdict&lt;/del&gt;</strong>
&lt;tbody&gt;
- &lt;tr&gt; &lt;td&gt; Diablo 2 &lt;td&gt; Blizzard &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;8/10&lt;/del&gt;</strong>
- &lt;tr&gt; &lt;td&gt; Portal &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;10/10&lt;/del&gt;</strong>
- &lt;tr&gt; &lt;td&gt; Portal 2 &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;10/10&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;td&gt; Diablo 2 &lt;td&gt; Blizzard &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;8/10&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;td&gt; Portal &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;10/10&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;td&gt; Portal 2 &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;10/10&lt;/del&gt;</strong>
&lt;/table&gt;</pre>
</div>
@@ -44245,13 +44273,13 @@ <h6 id=date-and-time-state><span class=secno>4.10.7.1.7 </span><dfn title=attr-i
<a href=#parse-a-global-date-and-time-string title="parse a global date and time string">parsing a global
date and time</a> from it. User agents must not allow the user to
set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a non-empty
- string that is not a <a href=#valid-forced-utc-global-date-and-time-string>valid forced-UTC global date and time
+ string that is not a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC global date and time
string</a>, though user agents may allow the user to set and view
the time in another time zone and silently translate the time to and
from the UTC time zone in the <a href=#concept-fe-value title=concept-fe-value>value</a>. If the user agent provides a
user interface for selecting a <a href=#concept-datetime title=concept-datetime>global
- date and time</a>, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#valid-forced-utc-global-date-and-time-string>valid
- forced-UTC global date and time string</a> representing the
+ date and time</a>, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid
+ normalized forced-UTC global date and time string</a> representing the
user's selection. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.</p>
</div>
@@ -44273,9 +44301,9 @@ <h6 id=date-and-time-state><span class=secno>4.10.7.1.7 </span><dfn title=attr-i
follows</strong>: If the <a href=#concept-fe-value title=concept-fe-value>value</a>
of the element is a <a href=#valid-global-date-and-time-string>valid global date and time string</a>,
then adjust the time so that the <a href=#concept-fe-value title=concept-fe-value>value</a> represents the same point in
- time but expressed in the UTC time zone as a <a href=#valid-forced-utc-global-date-and-time-string>valid forced-UTC
- global date and time string</a>, otherwise, set it to the empty
- string instead.</p>
+ time but expressed in the UTC time zone as a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized
+ forced-UTC global date and time string</a>, otherwise, set it to
+ the empty string instead.</p>
</div>
@@ -44309,8 +44337,8 @@ <h6 id=date-and-time-state><span class=secno>4.10.7.1.7 </span><dfn title=attr-i
<p><strong>The <a href=#concept-input-value-number-string title=concept-input-value-number-string>algorithm to convert a
number to a string</a>, given a number <var title="">input</var>,
- is as follows</strong>: Return a <a href=#valid-global-date-and-time-string>valid global date and time
- string</a> expressed in UTC that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is <var title="">input</var> milliseconds after midnight UTC on the morning
+ is as follows</strong>: Return a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC
+ global date and time string</a> that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is <var title="">input</var> milliseconds after midnight UTC on the morning
of 1970-01-01 (the time represented by the value "<code title="">1970-01-01T00:00:00.0Z</code>").</p>
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
@@ -44324,8 +44352,8 @@ <h6 id=date-and-time-state><span class=secno>4.10.7.1.7 </span><dfn title=attr-i
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
<code>Date</code> object <var title="">input</var>, is as
- follows</strong>: Return a <a href=#valid-global-date-and-time-string>valid global date and time
- string</a> expressed in UTC that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is
+ follows</strong>: Return a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC global
+ date and time string</a> that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is
represented by <var title="">input</var>.</p>
</div>
@@ -45069,11 +45097,13 @@ <h6 id=local-date-and-time-state><span class=secno>4.10.7.1.12 </span><dfn title
<a href=#parse-a-local-date-and-time-string title="parse a local date and time string">parsing a date and
time</a> from it. User agents must not allow the user to set the
<a href=#concept-fe-value title=concept-fe-value>value</a> to a non-empty string
- that is not a <a href=#valid-local-date-and-time-string>valid local date and time string</a>. If the
- user agent provides a user interface for selecting a <a href=#concept-datetime-local title=concept-datetime-local>local date and time</a>, then the
- <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a
- <a href=#valid-local-date-and-time-string>valid local date and time string</a> representing the
- user's selection. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.</p>
+ that is not a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</a>. If the user agent provides a user interface for
+ selecting a <a href=#concept-datetime-local title=concept-datetime-local>local date and
+ time</a>, then the <a href=#concept-fe-value title=concept-fe-value>value</a>
+ must be set to a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</a> representing the user's selection. User agents should
+ allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.</p>
</div>
@@ -45091,8 +45121,10 @@ <h6 id=local-date-and-time-state><span class=secno>4.10.7.1.12 </span><dfn title
<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
follows</strong>: If the <a href=#concept-fe-value title=concept-fe-value>value</a>
- of the element is not a <a href=#valid-local-date-and-time-string>valid local date and time
- string</a>, then set it to the empty string instead.</p>
+ of the element is a <a href=#valid-local-date-and-time-string>valid local date and time string</a>,
+ then set it to a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</a> representing the same date and time; otherwise, set it
+ to the empty string instead.</p>
</div>
@@ -45126,9 +45158,10 @@ <h6 id=local-date-and-time-state><span class=secno>4.10.7.1.12 </span><dfn title
<p><strong>The <a href=#concept-input-value-number-string title=concept-input-value-number-string>algorithm to convert a
number to a string</a>, given a number <var title="">input</var>,
- is as follows</strong>: Return a <a href=#valid-local-date-and-time-string>valid local date and time
- string</a> that represents the date and time that is <var title="">input</var> milliseconds after midnight on the morning of
- 1970-01-01 (the time represented by the value "<code title="">1970-01-01T00:00:00.0</code>").</p>
+ is as follows</strong>: Return a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date
+ and time string</a> that represents the date and time that is
+ <var title="">input</var> milliseconds after midnight on the morning
+ of 1970-01-01 (the time represented by the value "<code title="">1970-01-01T00:00:00.0</code>").</p>
</div>
@@ -59174,8 +59207,8 @@ <h5 id=examples-1><span class=secno>5.4.1.2 </span>Examples</h5>
&lt;meta itemprop="type" content="cell"&gt;mobile phone&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
- &lt;ins datetime="2008-07-20T21:00:00+01:00"&gt;
- &lt;meta itemprop="rev" content="2008-07-20T21:00:00+01:00"&gt;
+ &lt;ins datetime="2008-07-20 21:00:00+01:00"&gt;
+ &lt;meta itemprop="rev" content="2008-07-20 21:00:00+01:00"&gt;
&lt;p itemprop="tel" itemscope&gt;&lt;strong&gt;Update!&lt;/strong&gt;
My new &lt;span itemprop="type"&gt;home&lt;/span&gt; phone number is
&lt;span itemprop="value"&gt;01632 960 123&lt;/span&gt;.&lt;/p&gt;
@@ -80883,8 +80916,7 @@ <h5 id=determining-the-character-encoding><span class=secno>12.2.2.1 </span>Dete
stream. Such algorithms may use information about the resource
other than the resource's contents, including the address of the
resource. If autodetection succeeds in determining a character
- encoding, and that encoding is a supported encoding, then return
- that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
+ encoding, then return that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
<i>tentative</i>, and abort these steps. <a href=#refsUNIVCHARDET>[UNIVCHARDET]</a></p>
<p class=note>The UTF-8 encoding has a highly detectable bit
View
154 index
@@ -240,7 +240,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 5 December 2011</h2>
+ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 December 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -5856,11 +5856,21 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
representing a date and time if it consists of the following
components in the given order:</p>
- <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date.</li>
+ <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
+
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T) or a U+0020 SPACE character</li>
+
+ <li>A <a href=#valid-time-string>valid time string</a> representing the time</li>
+
+ </ol><p>A string is a <dfn id=valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</dfn> representing a date and time if it consists of the
+ following components in the given order:</p>
- <li>A U+0054 LATIN CAPITAL LETTER T character (T).</li>
+ <ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
+
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>
- <li>A <a href=#valid-time-string>valid time string</a> representing the time.</li>
+ <li>A <a href=#valid-time-string>valid time string</a> representing the time, expressed as the shortest possible string for the given time (e.g. omitting the seconds component entirely if the given time is zero seconds past the minute)</li>
</ol><div class=impl>
@@ -5877,8 +5887,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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 (T) 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 neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE 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>
@@ -6061,7 +6072,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<ol><li>A <a href=#valid-date-string>valid date string</a> representing the date</li>
- <li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T) or a U+0020 SPACE character</li>
<li>A <a href=#valid-time-string>valid time string</a> representing the time</li>
@@ -6081,7 +6092,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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>
- <dl><dt>"<code>0037-12-13T00:00Z</code>"</dt>
+ <dl><dt>"<code>0037-12-13 00:00Z</code>"</dt>
<dd>Midnight in areas using London time on the birthday of Nero
(the Roman Emperor). See below for further discussion on which
@@ -6105,6 +6116,10 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<ul><li>Years with fewer than four digits have to be
zero-padded. The date "37-12-13" would not be a valid date.</li>
+ <li>If the "<code title="">T</code>" is replaced by a space, it
+ must be a single space character. The string "<code title="">2001-12-21&nbsp;&nbsp;12:00Z</code>" (with two spaces
+ between the components) would not be parsed successfully.</li>
+
<li>To unambiguously identify a moment in time prior to the
introduction of the Gregorian calendar (insofar as moments in time
before the formation of UTC can be unambiguously identified), the
@@ -6131,7 +6146,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
</ul></div>
- <p>A string is a <dfn id=valid-forced-utc-global-date-and-time-string>valid forced-UTC global date and time
+ <p>A string is a <dfn id=valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC global date and time
string</dfn> representing a date, time, and a time-zone offset if it
consists of the following components in the given order:</p>
@@ -6145,15 +6160,6 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
</ol><div class=impl>
- <p>The <dfn id=best-representation-of-the-global-date-and-time-string>best representation of the global date and time
- string</dfn> <var title="">datetime</var> is the <a href=#valid-global-date-and-time-string>valid global
- date and time string</a> representing <var title="">datetime</var>, with the <a href=#valid-time-string>valid time string</a>
- component being given in its shortest possible form, with the last
- character of the string not being a U+005A LATIN CAPITAL LETTER Z
- character (Z), even if the time zone is UTC, and with a U+002B PLUS
- SIGN character (+) representing the sign of the time-zone offset
- when the time zone is UTC.</p>
-
<p>The rules to <dfn id=parse-a-global-date-and-time-string>parse a global date and time string</dfn> are
as follows. This will return either a time in UTC, with associated
time-zone offset information for round-tripping or display purposes,
@@ -6168,8 +6174,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<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 (T) 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 neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE 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>
@@ -6691,9 +6698,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<p>A string is a <dfn id=valid-date-string-with-optional-time>valid date string with optional time</dfn> if
it is also one of the following:</p>
- <ul><li>A <a href=#valid-date-string>valid date string</a>.</li>
+ <ul><li>A <a href=#valid-date-string>valid date string</a></li>
- <li>A <a href=#valid-global-date-and-time-string>valid global date and time string</a>.</li>
+ <li>A <a href=#valid-global-date-and-time-string>valid global date and time string</a></li>
</ul><div class=impl>
@@ -6718,14 +6725,12 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li>
- <p>If <var title="">date present</var> is true, and <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+0054 LATIN CAPITAL LETTER T
- character (T), then advance <var title="">position</var> to the
- next character in <var title="">input</var>.</p>
+ <p>If <var title="">date present</var> is true, and <var title="">position</var> is not beyond the end of <var title="">input</var>, and the character at <var title="">position</var> is either a U+0054 LATIN CAPITAL LETTER T
+ character (T) or a U+0020 SPACE character, then advance <var title="">position</var> to the next character in <var title="">input</var>.</p>
<p>Otherwise, if <var title="">date present</var> is true, and
- either <var title="">position</var> is beyond the end of <var title="">input</var> or the character at <var title="">position</var> is not a U+0054 LATIN CAPITAL LETTER T
- character (T), then set <var title="">time present</var> to
- false.</p>
+ either <var title="">position</var> is beyond the end of <var title="">input</var> or the character at <var title="">position</var> is neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE character, then set <var title="">time present</var> to false.</p>
<p>Otherwise, if <var title="">date present</var> is false, set
<var title="">position</var> back to the same position as <var title="">start position</var>.</p>
@@ -21186,6 +21191,9 @@ this specification: the &lt;abbr&gt;WHATWG&lt;/abbr&gt; and the
<pre class=example>&lt;time&gt;2011-11-12T14:54&lt;/time&gt;</pre>
<pre class=example>&lt;time&gt;2011-11-12T14:54:39&lt;/time&gt;</pre>
<pre class=example>&lt;time&gt;2011-11-12T14:54:39.92922&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922&lt;/time&gt;</pre>
</dd>
@@ -21227,6 +21235,26 @@ this specification: the &lt;abbr&gt;WHATWG&lt;/abbr&gt; and the
<pre class=example>&lt;time&gt;2011-11-12T06:54:39-08:00&lt;/time&gt;</pre>
<pre class=example>&lt;time&gt;2011-11-12T06:54:39.92922-08:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54Z&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39Z&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922Z&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 14:54+0000&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39+0000&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922+0000&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 14:54+00:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39+00:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 14:54:39.92922+00:00&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 06:54-0800&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39-0800&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39.92922-0800&lt;/time&gt;</pre>
+
+ <pre class=example>&lt;time&gt;2011-11-12 06:54-08:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39-08:00&lt;/time&gt;</pre>
+ <pre class=example>&lt;time&gt;2011-11-12 06:54:39.92922-08:00&lt;/time&gt;</pre>
+
</dd>
@@ -22659,11 +22687,11 @@ Course course = Helm.CourseFactory(Heading, &lt;wbr&gt;Maps.MapFactoryFromHeadin
<pre class=bad>&lt;aside&gt;
&lt;!-- don't do this --&gt;
- &lt;ins datetime="2005-03-16T00:00Z"&gt;
+ &lt;ins datetime="2005-03-16 00:00Z"&gt;
&lt;p&gt; I like fruit. &lt;/p&gt;
Apples are &lt;em&gt;tasty&lt;/em&gt;.
&lt;/ins&gt;
- &lt;ins datetime="2007-12-19T00:00Z"&gt;
+ &lt;ins datetime="2007-12-19 00:00Z"&gt;
So are pears.
&lt;/ins&gt;
&lt;/aside&gt;</pre>
@@ -22672,13 +22700,13 @@ Course course = Helm.CourseFactory(Heading, &lt;wbr&gt;Maps.MapFactoryFromHeadin
but none of the elements cross implied paragraph boundaries.</p>
<pre>&lt;aside&gt;
- &lt;ins datetime="2005-03-16T00:00Z"&gt;
+ &lt;ins datetime="2005-03-16 00:00Z"&gt;
&lt;p&gt; I like fruit. &lt;/p&gt;
&lt;/ins&gt;
- &lt;ins datetime="2005-03-16T00:00Z"&gt;
+ &lt;ins datetime="2005-03-16 00:00Z"&gt;
Apples are &lt;em&gt;tasty&lt;/em&gt;.
&lt;/ins&gt;
- &lt;ins datetime="2007-12-19T00:00Z"&gt;
+ &lt;ins datetime="2007-12-19 00:00Z"&gt;
So are pears.
&lt;/ins&gt;
&lt;/aside&gt;</pre>
@@ -22935,11 +22963,11 @@ Course course = Helm.CourseFactory(Heading, &lt;wbr&gt;Maps.MapFactoryFromHeadin
<pre>&lt;table&gt;
&lt;thead&gt;
- &lt;tr&gt; &lt;th&gt; Game name &lt;th&gt; Game publisher &lt;th&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;Verdict&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;th&gt; Game name &lt;th&gt; Game publisher &lt;th&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;Verdict&lt;/del&gt;</strong>
&lt;tbody&gt;
- &lt;tr&gt; &lt;td&gt; Diablo 2 &lt;td&gt; Blizzard &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;8/10&lt;/del&gt;</strong>
- &lt;tr&gt; &lt;td&gt; Portal &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;10/10&lt;/del&gt;</strong>
- &lt;tr&gt; &lt;td&gt; Portal 2 &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z"&gt;10/10&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;td&gt; Diablo 2 &lt;td&gt; Blizzard &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;8/10&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;td&gt; Portal &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;10/10&lt;/del&gt;</strong>
+ &lt;tr&gt; &lt;td&gt; Portal 2 &lt;td&gt; Valve &lt;td&gt; <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z"&gt;10/10&lt;/del&gt;</strong>
&lt;/table&gt;</pre>
</div>
@@ -44245,13 +44273,13 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<a href=#parse-a-global-date-and-time-string title="parse a global date and time string">parsing a global
date and time</a> from it. User agents must not allow the user to
set the <a href=#concept-fe-value title=concept-fe-value>value</a> to a non-empty
- string that is not a <a href=#valid-forced-utc-global-date-and-time-string>valid forced-UTC global date and time
+ string that is not a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC global date and time
string</a>, though user agents may allow the user to set and view
the time in another time zone and silently translate the time to and
from the UTC time zone in the <a href=#concept-fe-value title=concept-fe-value>value</a>. If the user agent provides a
user interface for selecting a <a href=#concept-datetime title=concept-datetime>global
- date and time</a>, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#valid-forced-utc-global-date-and-time-string>valid
- forced-UTC global date and time string</a> representing the
+ date and time</a>, then the <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid
+ normalized forced-UTC global date and time string</a> representing the
user's selection. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.</p>
</div>
@@ -44273,9 +44301,9 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
follows</strong>: If the <a href=#concept-fe-value title=concept-fe-value>value</a>
of the element is a <a href=#valid-global-date-and-time-string>valid global date and time string</a>,
then adjust the time so that the <a href=#concept-fe-value title=concept-fe-value>value</a> represents the same point in
- time but expressed in the UTC time zone as a <a href=#valid-forced-utc-global-date-and-time-string>valid forced-UTC
- global date and time string</a>, otherwise, set it to the empty
- string instead.</p>
+ time but expressed in the UTC time zone as a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized
+ forced-UTC global date and time string</a>, otherwise, set it to
+ the empty string instead.</p>
</div>
@@ -44309,8 +44337,8 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<p><strong>The <a href=#concept-input-value-number-string title=concept-input-value-number-string>algorithm to convert a
number to a string</a>, given a number <var title="">input</var>,
- is as follows</strong>: Return a <a href=#valid-global-date-and-time-string>valid global date and time
- string</a> expressed in UTC that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is <var title="">input</var> milliseconds after midnight UTC on the morning
+ is as follows</strong>: Return a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC
+ global date and time string</a> that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is <var title="">input</var> milliseconds after midnight UTC on the morning
of 1970-01-01 (the time represented by the value "<code title="">1970-01-01T00:00:00.0Z</code>").</p>
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
@@ -44324,8 +44352,8 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
<code>Date</code> object <var title="">input</var>, is as
- follows</strong>: Return a <a href=#valid-global-date-and-time-string>valid global date and time
- string</a> expressed in UTC that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is
+ follows</strong>: Return a <a href=#valid-normalized-forced-utc-global-date-and-time-string>valid normalized forced-UTC global
+ date and time string</a> that represents the <a href=#concept-datetime title=concept-datetime>global date and time</a> that is
represented by <var title="">input</var>.</p>
</div>
@@ -45069,11 +45097,13 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<a href=#parse-a-local-date-and-time-string title="parse a local date and time string">parsing a date and
time</a> from it. User agents must not allow the user to set the
<a href=#concept-fe-value title=concept-fe-value>value</a> to a non-empty string
- that is not a <a href=#valid-local-date-and-time-string>valid local date and time string</a>. If the
- user agent provides a user interface for selecting a <a href=#concept-datetime-local title=concept-datetime-local>local date and time</a>, then the
- <a href=#concept-fe-value title=concept-fe-value>value</a> must be set to a
- <a href=#valid-local-date-and-time-string>valid local date and time string</a> representing the
- user's selection. User agents should allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.</p>
+ that is not a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</a>. If the user agent provides a user interface for
+ selecting a <a href=#concept-datetime-local title=concept-datetime-local>local date and
+ time</a>, then the <a href=#concept-fe-value title=concept-fe-value>value</a>
+ must be set to a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</a> representing the user's selection. User agents should
+ allow the user to set the <a href=#concept-fe-value title=concept-fe-value>value</a> to the empty string.</p>
</div>
@@ -45091,8 +45121,10 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<p><strong>The <a href=#value-sanitization-algorithm>value sanitization algorithm</a> is as
follows</strong>: If the <a href=#concept-fe-value title=concept-fe-value>value</a>
- of the element is not a <a href=#valid-local-date-and-time-string>valid local date and time
- string</a>, then set it to the empty string instead.</p>
+ of the element is a <a href=#valid-local-date-and-time-string>valid local date and time string</a>,
+ then set it to a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date and time
+ string</a> representing the same date and time; otherwise, set it
+ to the empty string instead.</p>
</div>
@@ -45126,9 +45158,10 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<p><strong>The <a href=#concept-input-value-number-string title=concept-input-value-number-string>algorithm to convert a
number to a string</a>, given a number <var title="">input</var>,
- is as follows</strong>: Return a <a href=#valid-local-date-and-time-string>valid local date and time
- string</a> that represents the date and time that is <var title="">input</var> milliseconds after midnight on the morning of
- 1970-01-01 (the time represented by the value "<code title="">1970-01-01T00:00:00.0</code>").</p>
+ is as follows</strong>: Return a <a href=#valid-normalized-local-date-and-time-string>valid normalized local date
+ and time string</a> that represents the date and time that is
+ <var title="">input</var> milliseconds after midnight on the morning
+ of 1970-01-01 (the time represented by the value "<code title="">1970-01-01T00:00:00.0</code>").</p>
</div>
@@ -59174,8 +59207,8 @@ document.body.appendChild(outer);</pre>
&lt;meta itemprop="type" content="cell"&gt;mobile phone&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
- &lt;ins datetime="2008-07-20T21:00:00+01:00"&gt;
- &lt;meta itemprop="rev" content="2008-07-20T21:00:00+01:00"&gt;
+ &lt;ins datetime="2008-07-20 21:00:00+01:00"&gt;
+ &lt;meta itemprop="rev" content="2008-07-20 21:00:00+01:00"&gt;
&lt;p itemprop="tel" itemscope&gt;&lt;strong&gt;Update!&lt;/strong&gt;
My new &lt;span itemprop="type"&gt;home&lt;/span&gt; phone number is
&lt;span itemprop="value"&gt;01632 960 123&lt;/span&gt;.&lt;/p&gt;
@@ -80883,8 +80916,7 @@ dictionary <dfn id=storageeventinit>StorageEventInit</dfn> : <a href=#eventinit>
stream. Such algorithms may use information about the resource
other than the resource's contents, including the address of the
resource. If autodetection succeeds in determining a character
- encoding, and that encoding is a supported encoding, then return
- that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
+ encoding, then return that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
<i>tentative</i>, and abort these steps. <a href=#refsUNIVCHARDET>[UNIVCHARDET]</a></p>
<p class=note>The UTF-8 encoding has a highly detectable bit
View
160 source
@@ -5271,11 +5271,25 @@ is conforming depends on which specs apply, and leaves it at that. -->
<ol>
- <li>A <span>valid date string</span> representing the date.</li>
+ <li>A <span>valid date string</span> representing the date</li>
+
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T) or a U+0020 SPACE character</li>
+
+ <li>A <span>valid time string</span> representing the time</li>
+
+ </ol>
+
+ <p>A string is a <dfn>valid normalized local date and time
+ string</dfn> representing a date and time if it consists of the
+ following components in the given order:</p>
- <li>A U+0054 LATIN CAPITAL LETTER T character (T).</li>
+ <ol>
+
+ <li>A <span>valid date string</span> representing the date</li>
- <li>A <span>valid time string</span> representing the time.</li>
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>
+
+ <li>A <span>valid time string</span> representing the time, expressed as the shortest possible string for the given time (e.g. omitting the seconds component entirely if the given time is zero seconds past the minute)</li>
</ol>
@@ -5301,9 +5315,9 @@ is conforming depends on which specs apply, and leaves it at that. -->
<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 (T) then fail. Otherwise, move <var
- title="">position</var> forwards one character.</p></li>
+ title="">position</var> is neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE character, then fail. Otherwise,
+ move <var title="">position</var> forwards one character.</p></li>
<li><p><span>Parse a time component</span> to obtain <var
title="">hour</var>, <var title="">minute</var>, and <var
@@ -5552,7 +5566,7 @@ is conforming depends on which specs apply, and leaves it at that. -->
<li>A <span>valid date string</span> representing the date</li>
- <li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>
+ <li>A U+0054 LATIN CAPITAL LETTER T character (T) or a U+0020 SPACE character</li>
<li>A <span>valid time string</span> representing the time</li>
@@ -5577,7 +5591,7 @@ is conforming depends on which specs apply, and leaves it at that. -->
<dl>
- <dt>"<code>0037-12-13T00:00Z</code>"</dt>
+ <dt>"<code>0037-12-13 00:00Z</code>"</dt>
<dd>Midnight in areas using London time on the birthday of Nero
(the Roman Emperor). See below for further discussion on which
@@ -5605,6 +5619,11 @@ is conforming depends on which specs apply, and leaves it at that. -->
<li>Years with fewer than four digits have to be
zero-padded. The date "37-12-13" would not be a valid date.</li>
+ <li>If the "<code title="">T</code>" is replaced by a space, it
+ must be a single space character. The string "<code
+ title="">2001-12-21&nbsp;&nbsp;12:00Z</code>" (with two spaces
+ between the components) would not be parsed successfully.</li>
+
<li>To unambiguously identify a moment in time prior to the
introduction of the Gregorian calendar (insofar as moments in time
before the formation of UTC can be unambiguously identified), the
@@ -5633,7 +5652,7 @@ is conforming depends on which specs apply, and leaves it at that. -->
</div>
- <p>A string is a <dfn>valid forced-UTC global date and time
+ <p>A string is a <dfn>valid normalized forced-UTC global date and time
string</dfn> representing a date, time, and a time-zone offset if it
consists of the following components in the given order:</p>
@@ -5651,16 +5670,6 @@ is conforming depends on which specs apply, and leaves it at that. -->
<div class="impl">
- <p>The <dfn>best representation of the global date and time
- string</dfn> <var title="">datetime</var> is the <span>valid global
- date and time string</span> representing <var
- title="">datetime</var>, with the <span>valid time string</span>
- component being given in its shortest possible form, with the last
- character of the string not being a U+005A LATIN CAPITAL LETTER Z
- character (Z), even if the time zone is UTC, and with a U+002B PLUS
- SIGN character (+) representing the sign of the time-zone offset
- when the time zone is UTC.</p>
-
<p>The rules to <dfn>parse a global date and time string</dfn> are
as follows. This will return either a time in UTC, with associated
time-zone offset information for round-tripping or display purposes,
@@ -5682,9 +5691,9 @@ is conforming depends on which specs apply, and leaves it at that. -->
<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 (T) then fail. Otherwise, move <var
- title="">position</var> forwards one character.</p></li>
+ title="">position</var> is neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE character, then fail. Otherwise,
+ move <var title="">position</var> forwards one character.</p></li>
<li><p><span>Parse a time component</span> to obtain <var
title="">hour</var>, <var title="">minute</var>, and <var
@@ -6326,9 +6335,9 @@ is conforming depends on which specs apply, and leaves it at that. -->
<ul>
- <li>A <span>valid date string</span>.</li>
+ <li>A <span>valid date string</span></li>
- <li>A <span>valid global date and time string</span>.</li>
+ <li>A <span>valid global date and time string</span></li>
</ul>
@@ -6369,16 +6378,17 @@ is conforming depends on which specs apply, and leaves it at that. -->
<p>If <var title="">date present</var> is true, and <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+0054 LATIN CAPITAL LETTER T
- character (T), then advance <var title="">position</var> to the
- next character in <var title="">input</var>.</p>
+ title="">position</var> is either a U+0054 LATIN CAPITAL LETTER T
+ character (T) or a U+0020 SPACE character, then advance <var
+ title="">position</var> to the next character in <var
+ title="">input</var>.</p>
<p>Otherwise, if <var title="">date present</var> is true, and
either <var title="">position</var> is beyond the end of <var
title="">input</var> or the character at <var
- title="">position</var> is not a U+0054 LATIN CAPITAL LETTER T
- character (T), then set <var title="">time present</var> to
- false.</p>
+ title="">position</var> is neither a U+0054 LATIN CAPITAL LETTER T
+ character (T) nor a U+0020 SPACE character, then set <var
+ title="">time present</var> to false.</p>
<p>Otherwise, if <var title="">date present</var> is false, set
<var title="">position</var> back to the same position as <var
@@ -22714,6 +22724,9 @@ this specification: the &lt;abbr>WHATWG&lt;/abbr> and the
<pre class="example">&lt;time>2011-11-12T14:54&lt;/time></pre>
<pre class="example">&lt;time>2011-11-12T14:54:39&lt;/time></pre>
<pre class="example">&lt;time>2011-11-12T14:54:39.92922&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39.92922&lt;/time></pre>
</dd>
@@ -22755,6 +22768,26 @@ this specification: the &lt;abbr>WHATWG&lt;/abbr> and the
<pre class="example">&lt;time>2011-11-12T06:54:39-08:00&lt;/time></pre>
<pre class="example">&lt;time>2011-11-12T06:54:39.92922-08:00&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54Z&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39Z&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39.92922Z&lt;/time></pre>
+
+ <pre class="example">&lt;time>2011-11-12 14:54+0000&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39+0000&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39.92922+0000&lt;/time></pre>
+
+ <pre class="example">&lt;time>2011-11-12 14:54+00:00&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39+00:00&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 14:54:39.92922+00:00&lt;/time></pre>
+
+ <pre class="example">&lt;time>2011-11-12 06:54-0800&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 06:54:39-0800&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 06:54:39.92922-0800&lt;/time></pre>
+
+ <pre class="example">&lt;time>2011-11-12 06:54-08:00&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 06:54:39-08:00&lt;/time></pre>
+ <pre class="example">&lt;time>2011-11-12 06:54:39.92922-08:00&lt;/time></pre>
+
</dd>
@@ -24301,11 +24334,11 @@ Course course = Helm.CourseFactory(Heading, &lt;wbr>Maps.MapFactoryFromHeading(h
<pre class="bad">&lt;aside>
&lt;!-- don't do this -->
- &lt;ins datetime="2005-03-16T00:00Z">
+ &lt;ins datetime="2005-03-16 00:00Z">
&lt;p> I like fruit. &lt;/p>
Apples are &lt;em>tasty&lt;/em>.
&lt;/ins>
- &lt;ins datetime="2007-12-19T00:00Z">
+ &lt;ins datetime="2007-12-19 00:00Z">
So are pears.
&lt;/ins>
&lt;/aside></pre>
@@ -24314,13 +24347,13 @@ Course course = Helm.CourseFactory(Heading, &lt;wbr>Maps.MapFactoryFromHeading(h
but none of the elements cross implied paragraph boundaries.</p>
<pre>&lt;aside>
- &lt;ins datetime="2005-03-16T00:00Z">
+ &lt;ins datetime="2005-03-16 00:00Z">
&lt;p> I like fruit. &lt;/p>
&lt;/ins>
- &lt;ins datetime="2005-03-16T00:00Z">
+ &lt;ins datetime="2005-03-16 00:00Z">
Apples are &lt;em>tasty&lt;/em>.
&lt;/ins>
- &lt;ins datetime="2007-12-19T00:00Z">
+ &lt;ins datetime="2007-12-19 00:00Z">
So are pears.
&lt;/ins>
&lt;/aside></pre>
@@ -24589,11 +24622,11 @@ Course course = Helm.CourseFactory(Heading, &lt;wbr>Maps.MapFactoryFromHeading(h
<pre>&lt;table>
&lt;thead>
- &lt;tr> &lt;th> Game name &lt;th> Game publisher &lt;th> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z">Verdict&lt;/del></strong>
+ &lt;tr> &lt;th> Game name &lt;th> Game publisher &lt;th> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z">Verdict&lt;/del></strong>
&lt;tbody>
- &lt;tr> &lt;td> Diablo 2 &lt;td> Blizzard &lt;td> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z">8/10&lt;/del></strong>
- &lt;tr> &lt;td> Portal &lt;td> Valve &lt;td> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z">10/10&lt;/del></strong>
- &lt;tr> &lt;td> Portal 2 &lt;td> Valve &lt;td> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02T14:23Z">10/10&lt;/del></strong>
+ &lt;tr> &lt;td> Diablo 2 &lt;td> Blizzard &lt;td> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z">8/10&lt;/del></strong>
+ &lt;tr> &lt;td> Portal &lt;td> Valve &lt;td> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z">10/10&lt;/del></strong>
+ &lt;tr> &lt;td> Portal 2 &lt;td> Valve &lt;td> <strong>&lt;del cite="/edits/r192" datetime="2011-05-02 14:23Z">10/10&lt;/del></strong>
&lt;/table></pre>
</div>
@@ -51612,15 +51645,15 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<span title="parse a global date and time string">parsing a global
date and time</span> from it. User agents must not allow the user to
set the <span title="concept-fe-value">value</span> to a non-empty
- string that is not a <span>valid forced-UTC global date and time
+ string that is not a <span>valid normalized forced-UTC global date and time
string</span>, though user agents may allow the user to set and view
the time in another time zone and silently translate the time to and
from the UTC time zone in the <span
title="concept-fe-value">value</span>. If the user agent provides a
user interface for selecting a <span title="concept-datetime">global
date and time</span>, then the <span
title="concept-fe-value">value</span> must be set to a <span>valid
- forced-UTC global date and time string</span> representing the
+ normalized forced-UTC global date and time string</span> representing the
user's selection. User agents should allow the user to set the <span
title="concept-fe-value">value</span> to the empty string.</p>
@@ -51644,9 +51677,9 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
of the element is a <span>valid global date and time string</span>,
then adjust the time so that the <span
title="concept-fe-value">value</span> represents the same point in
- time but expressed in the UTC time zone as a <span>valid forced-UTC
- global date and time string</span>, otherwise, set it to the empty
- string instead.</p>
+ time but expressed in the UTC time zone as a <span>valid normalized
+ forced-UTC global date and time string</span>, otherwise, set it to
+ the empty string instead.</p>
</div>
@@ -51688,8 +51721,8 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<p><strong>The <span
title="concept-input-value-number-string">algorithm to convert a
number to a string</span>, given a number <var title="">input</var>,
- is as follows</strong>: Return a <span>valid global date and time
- string</span> expressed in UTC that represents the <span
+ is as follows</strong>: Return a <span>valid normalized forced-UTC
+ global date and time string</span> that represents the <span
title="concept-datetime">global date and time</span> that is <var
title="">input</var> milliseconds after midnight UTC on the morning
of 1970-01-01 (the time represented by the value "<code
@@ -51709,8 +51742,8 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
title="concept-input-value-date-string">algorithm to convert a
<code>Date</code> object to a string</span>, given a
<code>Date</code> object <var title="">input</var>, is as
- follows</strong>: Return a <span>valid global date and time
- string</span> expressed in UTC that represents the <span
+ follows</strong>: Return a <span>valid normalized forced-UTC global
+ date and time string</span> that represents the <span
title="concept-datetime">global date and time</span> that is
represented by <var title="">input</var>.</p>
@@ -52553,12 +52586,13 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<span title="parse a local date and time string">parsing a date and
time</span> from it. User agents must not allow the user to set the
<span title="concept-fe-value">value</span> to a non-empty string
- that is not a <span>valid local date and time string</span>. If the
- user agent provides a user interface for selecting a <span
- title="concept-datetime-local">local date and time</span>, then the
- <span title="concept-fe-value">value</span> must be set to a
- <span>valid local date and time string</span> representing the
- user's selection. User agents should allow the user to set the <span
+ that is not a <span>valid normalized local date and time
+ string</span>. If the user agent provides a user interface for
+ selecting a <span title="concept-datetime-local">local date and
+ time</span>, then the <span title="concept-fe-value">value</span>
+ must be set to a <span>valid normalized local date and time
+ string</span> representing the user's selection. User agents should
+ allow the user to set the <span
title="concept-fe-value">value</span> to the empty string.</p>
</div>
@@ -52577,8 +52611,10 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<p><strong>The <span>value sanitization algorithm</span> is as
follows</strong>: If the <span title="concept-fe-value">value</span>
- of the element is not a <span>valid local date and time
- string</span>, then set it to the empty string instead.</p>
+ of the element is a <span>valid local date and time string</span>,
+ then set it to a <span>valid normalized local date and time
+ string</span> representing the same date and time; otherwise, set it
+ to the empty string instead.</p>
</div>
@@ -52620,10 +52656,10 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<p><strong>The <span
title="concept-input-value-number-string">algorithm to convert a
number to a string</span>, given a number <var title="">input</var>,
- is as follows</strong>: Return a <span>valid local date and time
- string</span> that represents the date and time that is <var
- title="">input</var> milliseconds after midnight on the morning of
- 1970-01-01 (the time represented by the value "<code
+ is as follows</strong>: Return a <span>valid normalized local date
+ and time string</span> that represents the date and time that is
+ <var title="">input</var> milliseconds after midnight on the morning
+ of 1970-01-01 (the time represented by the value "<code
title="">1970-01-01T00:00:00.0</code>").</p>
</div>
@@ -69270,8 +69306,8 @@ partial interface <span>HTMLElement</span> {
&lt;meta itemprop="type" content="cell">mobile phone&lt;/span>
&lt;/li>
&lt;/ul>
- &lt;ins datetime="2008-07-20T21:00:00+01:00">
- &lt;meta itemprop="rev" content="2008-07-20T21:00:00+01:00">
+ &lt;ins datetime="2008-07-20 21:00:00+01:00">
+ &lt;meta itemprop="rev" content="2008-07-20 21:00:00+01:00">
&lt;p itemprop="tel" itemscope>&lt;strong>Update!&lt;/strong>
My new &lt;span itemprop="type">home&lt;/span> phone number is
&lt;span itemprop="value">01632 960 123&lt;/span>.&lt;/p>

0 comments on commit b0b3270

Please sign in to comment.