Skip to content
Permalink
Browse files
[giow] (1) Define the serialisation requirments for type=datetime.
git-svn-id: http://svn.whatwg.org/webapps@6235 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 15, 2011
1 parent a4c3d70 commit dd6f8dd2bb5bf69c05e44301f0babe7dbc2e9191
Showing with 74 additions and 28 deletions.
  1. +24 −10 complete.html
  2. +24 −10 index
  3. +26 −8 source
@@ -5312,7 +5312,19 @@ <h5 id=global-dates-and-times><span class=secno>2.5.5.5 </span>Global dates and

</ul></div>

<div class=impl>
<p>A string is a <dfn id=valid-forced-utc-global-date-and-time-string>valid 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>

<ol><li>A <a href=#valid-date-string>valid date string</a> representing the date converted to the UTC time zone</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 converted to the UTC time zone and 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>

<li>A U+005A LATIN CAPITAL LETTER Z character (Z)</li>

</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
@@ -44542,13 +44554,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-global-date-and-time-string>valid global date and time string</a>
expressed in UTC, 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
string that is not a <a href=#valid-forced-utc-global-date-and-time-string>valid 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-global-date-and-time-string>valid
global date and time string</a> expressed in UTC 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-forced-utc-global-date-and-time-string>valid
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>
@@ -44561,16 +44573,18 @@ <h6 id=date-and-time-state><span class=secno>4.10.7.1.7 </span><dfn title=attr-i
<p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
specified and not empty, must have a value that is a <a href=#valid-global-date-and-time-string>valid
global date and time string</a>.</p> <!-- ok to set out-of-range
value, we never know when we might have to represent bogus input -->
value, we never know when we might have to represent bogus input;
also ok to be non-UTC, we convert it -->

<div class=impl>

<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 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, otherwise, set it to the
empty string instead.</p>
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>

</div>

34 index
@@ -5302,7 +5302,19 @@ explained in the previous section, which talks about RFC 2119. -->

</ul></div>

<div class=impl>
<p>A string is a <dfn id=valid-forced-utc-global-date-and-time-string>valid 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>

<ol><li>A <a href=#valid-date-string>valid date string</a> representing the date converted to the UTC time zone</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 converted to the UTC time zone and 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>

<li>A U+005A LATIN CAPITAL LETTER Z character (Z)</li>

</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
@@ -44535,13 +44547,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-global-date-and-time-string>valid global date and time string</a>
expressed in UTC, 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
string that is not a <a href=#valid-forced-utc-global-date-and-time-string>valid 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-global-date-and-time-string>valid
global date and time string</a> expressed in UTC 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-forced-utc-global-date-and-time-string>valid
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>
@@ -44554,16 +44566,18 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<p>The <code title=attr-input-value><a href=#attr-input-value>value</a></code> attribute, if
specified and not empty, must have a value that is a <a href=#valid-global-date-and-time-string>valid
global date and time string</a>.</p> <!-- ok to set out-of-range
value, we never know when we might have to represent bogus input -->
value, we never know when we might have to represent bogus input;
also ok to be non-UTC, we convert it -->

<div class=impl>

<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 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, otherwise, set it to the
empty string instead.</p>
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>

</div>

34 source
@@ -4789,6 +4789,22 @@ 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
string</dfn> representing a date, time, and a time-zone offset if it
consists of the following components in the given order:</p>

<ol>

<li>A <span>valid date string</span> representing the date converted to the UTC time zone</li>

<li>A U+0054 LATIN CAPITAL LETTER T character (T)</li>

<li>A <span>valid time string</span> representing the time converted to the UTC time zone and 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>

<li>A U+005A LATIN CAPITAL LETTER Z character (Z)</li>

</ol>

<div class="impl">

<p>The <dfn>best representation of the global date and time
@@ -49938,15 +49954,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 global date and time string</span>
expressed in UTC, 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
string that is not a <span>valid 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
global date and time string</span> expressed in UTC representing the
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>

@@ -49960,7 +49976,8 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
<p>The <code title="attr-input-value">value</code> attribute, if
specified and not empty, must have a value that is a <span>valid
global date and time string</span>.</p> <!-- ok to set out-of-range
value, we never know when we might have to represent bogus input -->
value, we never know when we might have to represent bogus input;
also ok to be non-UTC, we convert it -->

<div class="impl">

@@ -49969,8 +49986,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, otherwise, set it to the
empty string instead.</p>
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>

</div>

0 comments on commit dd6f8dd

Please sign in to comment.