Skip to content
Permalink
Browse files
[e] (0) Adjust terminology around time-zone offsets.
git-svn-id: http://svn.whatwg.org/webapps@3680 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 26, 2009
1 parent 1aa4751 commit bbf4b9ac67eaf30e2fcab348ba584a46f36c9ab0
Showing 2 changed files with 84 additions and 81 deletions.
78 index
@@ -3680,8 +3680,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<p>A <dfn id=concept-datetime title=concept-datetime>global date and time</dfn>
consists of a specific proleptic Gregorian date, consisting of a
year, a month, and a day, and a time, consisting of an hour, a
minute, a second, and a fraction of a second, expressed with a time
zone, consisting of a number of hours and minutes. <a href=#refsGREGORIAN>[GREGORIAN]</a></p>
minute, a second, and a fraction of a second, expressed with a
time-zone offset, consisting of a number of hours and minutes. <a href=#refsGREGORIAN>[GREGORIAN]</a></p>

<p>A string is a <dfn id=valid-global-date-and-time-string>valid global date and time string</dfn>
representing a date, time, and a time-zone offset if it consists of
@@ -3718,10 +3718,10 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

</ul></li>

</ol><p class=note>This format allows for time zone offsets from -23:59
to +23:59. In practice, however, the range of actual time zones is
-12:00 to +14:00, and the minutes component of actual time zones is
always either 00, 30, or 45.</p>
</ol><p class=note>This format allows for time-zone offsets from -23:59
to +23:59. In practice, however, the range of offsets of actual time
zones is -12:00 to +14:00, and the minutes component of offsets of
actual time zones is always either 00, 30, or 45.</p>

<div class=example>

@@ -3761,21 +3761,21 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
used. However, it seems unlikely that it would be given in the
Gregorian calendar, so I assume sites use the Julian one. -->

<li>The time and time-zone components are not optional.</li>
<li>The time and time-zone offset components are not optional.</li>

<li>Dates before the year zero can't be represented as a datetime
in this version of HTML.</li>

<li>Time zones differ based on daylight savings time.</li>
<li>Time-zone offsets differ based on daylight savings time.</li>

</ul></div>

<div class=impl>

<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 either return a time in UTC, with associated
time-zone information for round tripping or display purposes, or
nothing. If at any point the algorithm says that it "fails", this
time-zone offset information for round tripping or display purposes,
or nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>

<ol><li><p>Let <var title="">input</var> be the string being
@@ -3794,7 +3794,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<li><p>If <var title="">position</var> is beyond the end of <var title="">input</var>, then fail.</li>

<li><p><a href=#parse-a-time-zone-component>Parse a time-zone component</a> to obtain <var title="">timezone<sub title="">hours</sub></var> and <var title="">timezone<sub title="">minutes</sub></var>. If this returns
<li><p><a href=#parse-a-time-zone-offset-component>Parse a time-zone offset component</a> to obtain
<var title="">timezone<sub title="">hours</sub></var> and <var title="">timezone<sub title="">minutes</sub></var>. If this returns
nothing, then fail.</p>

<li><p>If <var title="">position</var> is <em>not</em> beyond the
@@ -3812,11 +3813,11 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<li><p>Return <var title="">time</var> and <var title="">timezone</var>.</li>

</ol><p>The rules to <dfn id=parse-a-time-zone-component>parse a time-zone component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return time-zone hours and time-zone
minutes, or nothing. If at any point the algorithm says that it
"fails", this means that it is aborted at that point and returns
nothing.</p>
</ol><p>The rules to <dfn id=parse-a-time-zone-offset-component>parse a time-zone offset component</dfn>, given
an <var title="">input</var> string and a <var title="">position</var>, are as follows. This will either return
time-zone hours and time-zone minutes, or nothing. If at any point
the algorithm says that it "fails", this means that it is aborted at
that point and returns nothing.</p>

<ol><li>

@@ -4038,9 +4039,9 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<li><p>If the <var title="">date present</var> and <var title="">time present</var> flags are both true, but <var title="">position</var> is beyond the end of <var title="">input</var>, then fail.</li>

<li><p>If the <var title="">date present</var> and <var title="">time present</var> flags are both true, <a href=#parse-a-time-zone-component>parse a
time-zone component</a> to obtain <var title="">timezone<sub title="">hours</sub></var> and <var title="">timezone<sub title="">minutes</sub></var>. If this returns nothing, then
fail.</p>
<li><p>If the <var title="">date present</var> and <var title="">time present</var> flags are both true, <a href=#parse-a-time-zone-offset-component>parse a
time-zone offset component</a> to obtain <var title="">timezone<sub title="">hours</sub></var> and <var title="">timezone<sub title="">minutes</sub></var>. If this returns
nothing, then fail.</p>

<li><p>For the <i>in content</i> variant: <a href=#skip-white_space-characters>skip White_Space
characters</a>.</li>
@@ -16521,7 +16522,8 @@ and a height of &lt;meter&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <strong>BAD!</
</dd>
</dl><p>The <code><a href=#the-time-element>time</a></code> element <a href=#represents>represents</a> either a
time on a 24 hour clock, or a precise date in the proleptic
Gregorian calendar, optionally with a time and a time zone. <a href=#refsGREGORIAN>[GREGORIAN]</a></p>
Gregorian calendar, optionally with a time and a time-zone
offset. <a href=#refsGREGORIAN>[GREGORIAN]</a></p>

<p>This element is intended as a way to encode modern dates and
times in a machine-readable way so that user agents can offer to add
@@ -16610,8 +16612,8 @@ and a height of &lt;meter&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <strong>BAD!</
<p>The <dfn id=dom-time-datetime title=dom-time-datetime><code>dateTime</code></dfn> DOM
attribute must <a href=#reflect>reflect</a> the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> content attribute.</p>

<p>User agents, to obtain the <dfn id=concept-time-date title=concept-time-date>date</dfn>, <dfn id=concept-time-time title=concept-time-time>time</dfn>, and <dfn id=concept-time-timezone title=concept-time-timezone>time zone</dfn> represented by a
<code><a href=#the-time-element>time</a></code> element, must follow these steps:</p>
<p>User agents, to obtain the <dfn id=concept-time-date title=concept-time-date>date</dfn>, <dfn id=concept-time-time title=concept-time-time>time</dfn>, and <dfn id=concept-time-timezone title=concept-time-timezone>time-zone offset</dfn> represented by
a <code><a href=#the-time-element>time</a></code> element, must follow these steps:</p>

<ol><li>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code>
attribute is present, then use the rules to <a href=#parse-a-date-or-time-string>parse a date or
@@ -16624,14 +16626,14 @@ and a height of &lt;meter&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <strong>BAD!</

<li>If <var title="">result</var> is empty (because the parsing
failed), then the <a href=#concept-time-date title=concept-time-date>date</a> is
unknown, the <a href=#concept-time-time title=concept-time-time>time</a> is unknown,
and the <a href=#concept-time-timezone title=concept-time-timezone>time zone</a> is
unknown.</li>
unknown, the <a href=#concept-time-time title=concept-time-time>time</a> is
unknown, and the <a href=#concept-time-timezone title=concept-time-timezone>time-zone
offset</a> is unknown.</li>

<li>Otherwise: if <var title="">result</var> contains a date, then
that is the <a href=#concept-time-date title=concept-time-date>date</a>; if <var title="">result</var> contains a time, then that is the <a href=#concept-time-time title=concept-time-time>time</a>; and if <var title="">result</var> contains a time zone, then the time zone is the
element's <a href=#concept-time-timezone title=concept-time-timezone>time zone</a>. (A
time zone can only be present if both a date and a time are also
that is the <a href=#concept-time-date title=concept-time-date>date</a>; if <var title="">result</var> contains a time, then that is the <a href=#concept-time-time title=concept-time-time>time</a>; and if <var title="">result</var> contains a time-zone offset, then the
time-zone offset is the element's <a href=#concept-time-timezone title=concept-time-timezone>time-zone offset</a>. (A time-zone
offset can only be present if both a date and a time are also
present.)</li>

</ol></div>
@@ -16685,12 +16687,12 @@ and a height of &lt;meter&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <strong>BAD!</
given <a href=#concept-time-time title=concept-time-time>time</a> of 1970-01-01, with
the time zone UTC.</p>

<p>The <dfn id=dom-time-timezone title=dom-time-timezone><code>timezone</code></dfn> DOM
attribute must return null if the <a href=#concept-time-timezone title=concept-time-timezone>time zone</a> is unknown, and otherwise
must return the time corresponding to 1970-01-01 00:00 UTC in the
given <a href=#concept-time-timezone title=concept-time-timezone>time zone</a>, with the
time zone set to UTC (i.e. the time corresponding to 1970-01-01 at
00:00 UTC plus the offset corresponding to the time zone).</p>
<p>The <dfn id=dom-time-timezone title=dom-time-timezone><code>timezone</code></dfn>
DOM attribute must return null if the <a href=#concept-time-timezone title=concept-time-timezone>time-zone offset</a> is unknown,
and otherwise must return the time corresponding to 1970-01-01 00:00
UTC in the given <a href=#concept-time-timezone title=concept-time-timezone>time-zone
offset</a>, with the time zone set to UTC (i.e. the time
corresponding to 1970-01-01 at 00:00 UTC plus the offset).</p>

</div>

@@ -17337,8 +17339,8 @@ and a height of &lt;meter&gt;2cm&lt;/meter&gt;.&lt;/p&gt; &lt;!-- <strong>BAD!</
timestamp (the value is non-conforming; it is not a <a href=#valid-global-date-and-time-string>valid
global date and time string</a>). Otherwise, the modification is
marked as having been made at the given datetime. User agents should
use the associated time-zone information to determine which time zone
to present the given datetime in.</p>
use the associated time-zone offset information to determine which
time zone to present the given datetime in.</p>

</div>

@@ -32363,7 +32365,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
<p>The <code><a href=#the-input-element>input</a></code> element <a href=#represents>represents</a> a control
for setting the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to a string representing a
<a href=#concept-datetime-local title=concept-datetime-local>local date and time</a>,
with no time zone information.</p>
with no time-zone offset information.</p>

<div class=impl>

@@ -71054,7 +71056,7 @@ time:empty { binding: <i title="">time</i>; }</pre>

<p>When the <i title="">time</i> binding applies to a
<code><a href=#the-time-element>time</a></code> element, the element is expected to render as if
it contained text conveying the <a href=#concept-time-date title=concept-time-date>date</a> (if known), <a href=#concept-time-time title=concept-time-time>time</a> (if known), and <a href=#concept-time-timezone title=concept-time-timezone>time zone</a> (if known)
it contained text conveying the <a href=#concept-time-date title=concept-time-date>date</a> (if known), <a href=#concept-time-time title=concept-time-time>time</a> (if known), and <a href=#concept-time-timezone title=concept-time-timezone>time-zone offset</a> (if known)
represented by the element, in the fashion most convenient for the
user.</p>

0 comments on commit bbf4b9a

Please sign in to comment.