[html5] r3693 - [e] (0) Move <time> away from <meter>.
whatwg at whatwg.org
whatwg at whatwg.org
Fri Aug 28 17:53:56 PDT 2009
Author: ianh
Date: 2009-08-28 17:53:55 -0700 (Fri, 28 Aug 2009)
New Revision: 3693
Modified:
index
source
Log:
[e] (0) Move <time> away from <meter>.
Modified: index
===================================================================
--- index 2009-08-29 00:50:31 UTC (rev 3692)
+++ index 2009-08-29 00:53:55 UTC (rev 3693)
@@ -361,17 +361,17 @@
<li><a href=#the-q-element><span class=secno>4.6.6 </span>The <code>q</code> element</a></li>
<li><a href=#the-dfn-element><span class=secno>4.6.7 </span>The <code>dfn</code> element</a></li>
<li><a href=#the-abbr-element><span class=secno>4.6.8 </span>The <code>abbr</code> element</a></li>
- <li><a href=#the-code-element><span class=secno>4.6.9 </span>The <code>code</code> element</a></li>
- <li><a href=#the-var-element><span class=secno>4.6.10 </span>The <code>var</code> element</a></li>
- <li><a href=#the-samp-element><span class=secno>4.6.11 </span>The <code>samp</code> element</a></li>
- <li><a href=#the-kbd-element><span class=secno>4.6.12 </span>The <code>kbd</code> element</a></li>
- <li><a href=#the-sub-and-sup-elements><span class=secno>4.6.13 </span>The <code>sub</code> and <code>sup</code> elements</a></li>
- <li><a href=#the-i-element><span class=secno>4.6.14 </span>The <code>i</code> element</a></li>
- <li><a href=#the-b-element><span class=secno>4.6.15 </span>The <code>b</code> element</a></li>
- <li><a href=#the-mark-element><span class=secno>4.6.16 </span>The <code>mark</code> element</a></li>
- <li><a href=#the-progress-element><span class=secno>4.6.17 </span>The <code>progress</code> element</a></li>
- <li><a href=#the-meter-element><span class=secno>4.6.18 </span>The <code>meter</code> element</a></li>
- <li><a href=#the-time-element><span class=secno>4.6.19 </span>The <code>time</code> element</a></li>
+ <li><a href=#the-time-element><span class=secno>4.6.9 </span>The <code>time</code> element</a></li>
+ <li><a href=#the-code-element><span class=secno>4.6.10 </span>The <code>code</code> element</a></li>
+ <li><a href=#the-var-element><span class=secno>4.6.11 </span>The <code>var</code> element</a></li>
+ <li><a href=#the-samp-element><span class=secno>4.6.12 </span>The <code>samp</code> element</a></li>
+ <li><a href=#the-kbd-element><span class=secno>4.6.13 </span>The <code>kbd</code> element</a></li>
+ <li><a href=#the-sub-and-sup-elements><span class=secno>4.6.14 </span>The <code>sub</code> and <code>sup</code> elements</a></li>
+ <li><a href=#the-i-element><span class=secno>4.6.15 </span>The <code>i</code> element</a></li>
+ <li><a href=#the-b-element><span class=secno>4.6.16 </span>The <code>b</code> element</a></li>
+ <li><a href=#the-mark-element><span class=secno>4.6.17 </span>The <code>mark</code> element</a></li>
+ <li><a href=#the-progress-element><span class=secno>4.6.18 </span>The <code>progress</code> element</a></li>
+ <li><a href=#the-meter-element><span class=secno>4.6.19 </span>The <code>meter</code> element</a></li>
<li><a href=#the-ruby-element><span class=secno>4.6.20 </span>The <code>ruby</code> element</a></li>
<li><a href=#the-rt-element><span class=secno>4.6.21 </span>The <code>rt</code> element</a></li>
<li><a href=#the-rp-element><span class=secno>4.6.22 </span>The <code>rp</code> element</a></li>
@@ -15355,15 +15355,250 @@
- <h4 id=the-code-element><span class=secno>4.6.9 </span>The <dfn><code>code</code></dfn> element</h4>
+ <h4 id=the-time-element><span class=secno>4.6.9 </span>The <dfn><code>time</code></dfn> element</h4>
+
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
<dd><a href=#phrasing-content>Phrasing content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
<dt>Content model:</dt>
+ <dd><a href=#phrasing-content>Phrasing content</a>, but there must be no <code><a href=#the-time-element>time</a></code> element descendants.</dd>
+ <dt>Content attributes:</dt>
+ <dd><a href=#global-attributes>Global attributes</a></dd>
+ <dd><code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code></dd>
+ <dt>DOM interface:</dt>
+ <dd>
+<pre class=idl>interface <dfn id=htmltimeelement>HTMLTimeElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
+ attribute DOMString <a href=#dom-time-datetime title=dom-time-datetime>dateTime</a>;
+ readonly attribute <span>Date</span> <a href=#dom-time-date title=dom-time-date>date</a>;
+ readonly attribute <span>Date</span> <a href=#dom-time-time title=dom-time-time>time</a>;
+ readonly attribute <span>Date</span> <a href=#dom-time-timezone title=dom-time-timezone>timezone</a>;
+};</pre>
+ </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
+ 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
+ them to the user's calendar. For example, adding birthday reminders
+ or scheduling events.</p>
+
+ <!-- it's also intended for restyling to local conventions
+ (2000-12-31 vs 31-12-2000 vs 12-31-2000), but CSS doesn't support
+ that yet. -->
+
+ <div class=note>
+
+ <p>The <code><a href=#the-time-element>time</a></code> element is not intended for encoding times
+ for which a precise date or time cannot be established. For
+ example, it would be inappropriate for encoding times like "one
+ millisecond after the big bang", "the early part of the Jurassic
+ period", or "a winter around 250 BCE".</p>
+
+ <p>For dates before the introduction of the Gregorian calendar,
+ authors are encouraged to not use the <code><a href=#the-time-element>time</a></code> element, or
+ else to be very careful about converting dates and times from the
+ period to the Gregorian calendar. This is complicated by the manner
+ in which the Gregorian calendar was phased in, which occurred at
+ different times in different countries, ranging from partway
+ through the 16th century all the way to early in the 20th.</p>
+
+ </div>
+
+ <p>The <dfn id=attr-time-datetime title=attr-time-datetime><code>datetime</code></dfn>
+ attribute, if present, must contain a <a href=#valid-date-or-time-string>valid date or time
+ string</a> that identifies the date or time being specified.</p>
+
+ <p>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute
+ is not present, then the date or time must be specified in the
+ content of the element, such that the element's
+ <code>textContent</code> is a <a href=#valid-date-or-time-string-in-content>valid date or time string in
+ content</a>, and the date, if any, must be expressed using the
+ Gregorian calendar.</p>
+
+ <p>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute
+ is present, then the element may be empty, in which case the user
+ agent should convey the attribute's value to the user when rendering
+ the element.</p>
+
+ <div class=example>
+
+ <p>The <code><a href=#the-time-element>time</a></code> element can be used to encode dates, for
+ example in Microformats. The following shows a hypothetical way of
+ encoding an event using a variant on hCalendar that uses the
+ <code><a href=#the-time-element>time</a></code> element:</p>
+
+ <pre><div class="vevent">
+ <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
+ <span class="summary">Web 2.0 Conference</span>:
+ <time class="dtstart" datetime="2007-10-05">October 5</time> -
+ <time class="dtend" datetime="2007-10-20">19</time>,
+ at the <span class="location">Argent Hotel, San Francisco, CA</span>
+ </div></pre>
+
+ </div>
+
+ <div class=example>
+
+ <p>The <code><a href=#the-time-element>time</a></code> element is not necessary for encoding
+ dates or times. In the following snippet, the time is encoded using
+ <code><a href=#the-time-element>time</a></code>, so that it can be restyled (e.g. using XBL2) to
+ match local conventions, while the year is not marked up at all,
+ since marking it up would not be particularly useful.</p>
+
+ <pre><p>I usually have a snack at <time>16:00</time>.</p>
+<p>I've liked model trains since at least 1983.</p></pre>
+
+ <p>Using a styling technology that supports restyling times, the
+ first paragraph from the above snippet could be rendered as follows:</p>
+
+ <blockquote><p>I usually have a snack at 4pm.</blockquote>
+
+ <p>Or it could be rendered as follows:</p>
+
+ <blockquote><p>I usually have a snack at 16h00.</blockquote>
+
+ </div>
+
+ <div class=impl>
+
+ <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 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
+ time string</a> with the flag <i>in attribute</i> from the value
+ of that attribute, and let the result be <var title="">result</var>.</li>
+
+ <li>Otherwise, use the rules to <a href=#parse-a-date-or-time-string>parse a date or time
+ string</a> with the flag <i>in content</i> from the element's
+ <code>textContent</code>, and let the result be <var title="">result</var>.</li>
+
+ <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
+ 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 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>
+
+ <dl class=domintro><dt><var title="">time</var> . <code title=dom-time-date><a href=#dom-time-date>date</a></code></dt>
+
+ <dd>
+
+ <p>Returns a <code>Date</code> object representing the date
+ component of the element's value, at midnight in the UTC
+ time zone.</p>
+
+ <p>Returns null if there is no date.</p>
+
+ </dd>
+
+ <dt><var title="">time</var> . <code title=dom-time-time><a href=#dom-time-time>time</a></code></dt>
+
+ <dd>
+
+ <p>Returns a <code>Date</code> object representing the time
+ component of the element's value, on 1970-01-01 in the UTC
+ time zone.</p>
+
+ <p>Returns null if there is no time.</p>
+
+ </dd>
+
+ <dt><var title="">time</var> . <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code></dt>
+
+ <dd>
+
+ <p>Returns a <code>Date</code> object representing the time
+ corresponding to 1970-01-01 00:00 UTC in the time zone given by the
+ element's value.</p>
+
+ <p>Returns null if there is no time zone.</p>
+
+ </dd>
+
+ </dl><div>
+
+ <p>The <dfn id=dom-time-date title=dom-time-date><code>date</code></dfn> DOM
+ attribute must return null if the <a href=#concept-time-date title=concept-time-date>date</a> is unknown, and otherwise must
+ return the time corresponding to midnight UTC (i.e. the first
+ second) of the given <a href=#concept-time-date title=concept-time-date>date</a>.</p>
+
+ <p>The <dfn id=dom-time-time title=dom-time-time><code>time</code></dfn> DOM attribute
+ must return null if the <a href=#concept-time-time title=concept-time-time>time</a> is
+ unknown, and otherwise must return the time corresponding to the
+ 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 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>
+
+ <div class=example>
+
+ <p>In the following snippet:</p>
+
+ <pre><p>Our first date was <time datetime="2006-09-23">a Saturday</time>.</p></pre>
+
+ <p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value
+ 1,158,969,600,000ms, and the <code title=dom-time-time><a href=#dom-time-time>time</a></code>
+ and <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attributes would
+ return null.</p>
+
+
+ <p>In the following snippet:</p>
+
+ <pre><p>We stopped talking at <time datetime="2006-09-24T05:00-07:00">5am the next morning</time>.</p></pre>
+
+ <p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value
+ 1,159,056,000,000ms, the <code title=dom-time-time><a href=#dom-time-time>time</a></code>
+ attribute would have the value 18,000,000ms, and the <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attribute would return
+ −25,200,000ms. To obtain the actual time, the three attributes can
+ be added together, obtaining 1,159,048,800,000, which is the
+ specified date and time in UTC.</p>
+
+
+ <p>Finally, in the following snippet:</p>
+
+ <pre><p>Many people get up at <time>08:00</time>.</p></pre>
+
+ <p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value null,
+ the <code title=dom-time-time><a href=#dom-time-time>time</a></code> attribute would have the
+ value 28,800,000ms, and the <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attribute would return
+ null.</p>
+
+ </div>
+
+
+
+ <h4 id=the-code-element><span class=secno>4.6.10 </span>The <dfn><code>code</code></dfn> element</h4>
+
+ <dl class=element><dt>Categories</dt>
+ <dd><a href=#flow-content>Flow content</a>.</dd>
<dd><a href=#phrasing-content>Phrasing content</a>.</dd>
+ <dt>Contexts in which this element may be used:</dt>
+ <dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
+ <dt>Content model:</dt>
+ <dd><a href=#phrasing-content>Phrasing content</a>.</dd>
<dt>Content attributes:</dt>
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt>DOM interface:</dt>
@@ -15417,7 +15652,7 @@
<p class=note>See the <code><a href=#the-pre-element>pre</a></code> element for more details.</p>
- <h4 id=the-var-element><span class=secno>4.6.10 </span>The <dfn><code>var</code></dfn> element</h4>
+ <h4 id=the-var-element><span class=secno>4.6.11 </span>The <dfn><code>var</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15475,7 +15710,7 @@
</div>
- <h4 id=the-samp-element><span class=secno>4.6.11 </span>The <dfn><code>samp</code></dfn> element</h4>
+ <h4 id=the-samp-element><span class=secno>4.6.12 </span>The <dfn><code>samp</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15513,7 +15748,7 @@
</div>
- <h4 id=the-kbd-element><span class=secno>4.6.12 </span>The <dfn><code>kbd</code></dfn> element</h4>
+ <h4 id=the-kbd-element><span class=secno>4.6.13 </span>The <dfn><code>kbd</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15564,7 +15799,7 @@
</div>
- <h4 id=the-sub-and-sup-elements><span class=secno>4.6.13 </span>The <dfn><code>sub</code></dfn> and <dfn><code>sup</code></dfn> elements</h4>
+ <h4 id=the-sub-and-sup-elements><span class=secno>4.6.14 </span>The <dfn><code>sub</code></dfn> and <dfn><code>sup</code></dfn> elements</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15628,7 +15863,7 @@
- <h4 id=the-i-element><span class=secno>4.6.14 </span>The <dfn><code>i</code></dfn> element</h4>
+ <h4 id=the-i-element><span class=secno>4.6.15 </span>The <dfn><code>i</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15687,7 +15922,7 @@
necessarily be italicized.</p>
- <h4 id=the-b-element><span class=secno>4.6.15 </span>The <dfn><code>b</code></dfn> element</h4>
+ <h4 id=the-b-element><span class=secno>4.6.16 </span>The <dfn><code>b</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15756,7 +15991,7 @@
- <h4 id=the-mark-element><span class=secno>4.6.16 </span>The <dfn><code>mark</code></dfn> element</h4>
+ <h4 id=the-mark-element><span class=secno>4.6.17 </span>The <dfn><code>mark</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -15891,7 +16126,7 @@
</div>
- <h4 id=the-progress-element><span class=secno>4.6.17 </span>The <dfn><code>progress</code></dfn> element</h4>
+ <h4 id=the-progress-element><span class=secno>4.6.18 </span>The <dfn><code>progress</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -16073,8 +16308,8 @@
</div>
- <h4 id=the-meter-element><span class=secno>4.6.18 </span>The <dfn><code>meter</code></dfn> element</h4>
- <!-- XXX Keep this after <progress> and NOT close to <time> -->
+ <h4 id=the-meter-element><span class=secno>4.6.19 </span>The <dfn><code>meter</code></dfn> element</h4>
+ <!-- Keep this after <progress> and NOT close to <time> -->
<dl class=element><dt>Categories</dt>
<dd><a href=#flow-content>Flow content</a>.</dd>
@@ -16506,240 +16741,8 @@
</div>
- <h4 id=the-time-element><span class=secno>4.6.19 </span>The <dfn><code>time</code></dfn> element</h4>
- <dl class=element><dt>Categories</dt>
- <dd><a href=#flow-content>Flow content</a>.</dd>
- <dd><a href=#phrasing-content>Phrasing content</a>.</dd>
- <dt>Contexts in which this element may be used:</dt>
- <dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
- <dt>Content model:</dt>
- <dd><a href=#phrasing-content>Phrasing content</a>, but there must be no <code><a href=#the-time-element>time</a></code> element descendants.</dd>
- <dt>Content attributes:</dt>
- <dd><a href=#global-attributes>Global attributes</a></dd>
- <dd><code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code></dd>
- <dt>DOM interface:</dt>
- <dd>
-<pre class=idl>interface <dfn id=htmltimeelement>HTMLTimeElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
- attribute DOMString <a href=#dom-time-datetime title=dom-time-datetime>dateTime</a>;
- readonly attribute <span>Date</span> <a href=#dom-time-date title=dom-time-date>date</a>;
- readonly attribute <span>Date</span> <a href=#dom-time-time title=dom-time-time>time</a>;
- readonly attribute <span>Date</span> <a href=#dom-time-timezone title=dom-time-timezone>timezone</a>;
-};</pre>
- </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
- 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
- them to the user's calendar. For example, adding birthday reminders
- or scheduling events.</p>
-
- <!-- it's also intended for restyling to local conventions
- (2000-12-31 vs 31-12-2000 vs 12-31-2000), but CSS doesn't support
- that yet. -->
-
- <div class=note>
-
- <p>The <code><a href=#the-time-element>time</a></code> element is not intended for encoding times
- for which a precise date or time cannot be established. For
- example, it would be inappropriate for encoding times like "one
- millisecond after the big bang", "the early part of the Jurassic
- period", or "a winter around 250 BCE".</p>
-
- <p>For dates before the introduction of the Gregorian calendar,
- authors are encouraged to not use the <code><a href=#the-time-element>time</a></code> element, or
- else to be very careful about converting dates and times from the
- period to the Gregorian calendar. This is complicated by the manner
- in which the Gregorian calendar was phased in, which occurred at
- different times in different countries, ranging from partway
- through the 16th century all the way to early in the 20th.</p>
-
- </div>
-
- <p>The <dfn id=attr-time-datetime title=attr-time-datetime><code>datetime</code></dfn>
- attribute, if present, must contain a <a href=#valid-date-or-time-string>valid date or time
- string</a> that identifies the date or time being specified.</p>
-
- <p>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute
- is not present, then the date or time must be specified in the
- content of the element, such that the element's
- <code>textContent</code> is a <a href=#valid-date-or-time-string-in-content>valid date or time string in
- content</a>, and the date, if any, must be expressed using the
- Gregorian calendar.</p>
-
- <p>If the <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute
- is present, then the element may be empty, in which case the user
- agent should convey the attribute's value to the user when rendering
- the element.</p>
-
- <div class=example>
-
- <p>The <code><a href=#the-time-element>time</a></code> element can be used to encode dates, for
- example in Microformats. The following shows a hypothetical way of
- encoding an event using a variant on hCalendar that uses the
- <code><a href=#the-time-element>time</a></code> element:</p>
-
- <pre><div class="vevent">
- <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
- <span class="summary">Web 2.0 Conference</span>:
- <time class="dtstart" datetime="2007-10-05">October 5</time> -
- <time class="dtend" datetime="2007-10-20">19</time>,
- at the <span class="location">Argent Hotel, San Francisco, CA</span>
- </div></pre>
-
- </div>
-
- <div class=example>
-
- <p>The <code><a href=#the-time-element>time</a></code> element is not necessary for encoding
- dates or times. In the following snippet, the time is encoded using
- <code><a href=#the-time-element>time</a></code>, so that it can be restyled (e.g. using XBL2) to
- match local conventions, while the year is not marked up at all,
- since marking it up would not be particularly useful.</p>
-
- <pre><p>I usually have a snack at <time>16:00</time>.</p>
-<p>I've liked model trains since at least 1983.</p></pre>
-
- <p>Using a styling technology that supports restyling times, the
- first paragraph from the above snippet could be rendered as follows:</p>
-
- <blockquote><p>I usually have a snack at 4pm.</blockquote>
-
- <p>Or it could be rendered as follows:</p>
-
- <blockquote><p>I usually have a snack at 16h00.</blockquote>
-
- </div>
-
- <div class=impl>
-
- <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 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
- time string</a> with the flag <i>in attribute</i> from the value
- of that attribute, and let the result be <var title="">result</var>.</li>
-
- <li>Otherwise, use the rules to <a href=#parse-a-date-or-time-string>parse a date or time
- string</a> with the flag <i>in content</i> from the element's
- <code>textContent</code>, and let the result be <var title="">result</var>.</li>
-
- <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
- 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 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>
-
- <dl class=domintro><dt><var title="">time</var> . <code title=dom-time-date><a href=#dom-time-date>date</a></code></dt>
-
- <dd>
-
- <p>Returns a <code>Date</code> object representing the date
- component of the element's value, at midnight in the UTC
- time zone.</p>
-
- <p>Returns null if there is no date.</p>
-
- </dd>
-
- <dt><var title="">time</var> . <code title=dom-time-time><a href=#dom-time-time>time</a></code></dt>
-
- <dd>
-
- <p>Returns a <code>Date</code> object representing the time
- component of the element's value, on 1970-01-01 in the UTC
- time zone.</p>
-
- <p>Returns null if there is no time.</p>
-
- </dd>
-
- <dt><var title="">time</var> . <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code></dt>
-
- <dd>
-
- <p>Returns a <code>Date</code> object representing the time
- corresponding to 1970-01-01 00:00 UTC in the time zone given by the
- element's value.</p>
-
- <p>Returns null if there is no time zone.</p>
-
- </dd>
-
- </dl><div>
-
- <p>The <dfn id=dom-time-date title=dom-time-date><code>date</code></dfn> DOM
- attribute must return null if the <a href=#concept-time-date title=concept-time-date>date</a> is unknown, and otherwise must
- return the time corresponding to midnight UTC (i.e. the first
- second) of the given <a href=#concept-time-date title=concept-time-date>date</a>.</p>
-
- <p>The <dfn id=dom-time-time title=dom-time-time><code>time</code></dfn> DOM attribute
- must return null if the <a href=#concept-time-time title=concept-time-time>time</a> is
- unknown, and otherwise must return the time corresponding to the
- 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 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>
-
- <div class=example>
-
- <p>In the following snippet:</p>
-
- <pre><p>Our first date was <time datetime="2006-09-23">a Saturday</time>.</p></pre>
-
- <p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value
- 1,158,969,600,000ms, and the <code title=dom-time-time><a href=#dom-time-time>time</a></code>
- and <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attributes would
- return null.</p>
-
-
- <p>In the following snippet:</p>
-
- <pre><p>We stopped talking at <time datetime="2006-09-24T05:00-07:00">5am the next morning</time>.</p></pre>
-
- <p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value
- 1,159,056,000,000ms, the <code title=dom-time-time><a href=#dom-time-time>time</a></code>
- attribute would have the value 18,000,000ms, and the <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attribute would return
- −25,200,000ms. To obtain the actual time, the three attributes can
- be added together, obtaining 1,159,048,800,000, which is the
- specified date and time in UTC.</p>
-
-
- <p>Finally, in the following snippet:</p>
-
- <pre><p>Many people get up at <time>08:00</time>.</p></pre>
-
- <p>...the <code><a href=#the-time-element>time</a></code> element's <code title=dom-time-date><a href=#dom-time-date>date</a></code> attribute would have the value null,
- the <code title=dom-time-time><a href=#dom-time-time>time</a></code> attribute would have the
- value 28,800,000ms, and the <code title=dom-time-timezone><a href=#dom-time-timezone>timezone</a></code> attribute would return
- null.</p>
-
- </div>
-
-
-
<h4 id=the-ruby-element><span class=secno>4.6.20 </span>The <dfn><code>ruby</code></dfn> element</h4>
<dl class=element><dt>Categories</dt>
@@ -17017,6 +17020,10 @@
<td>Abbreviations
<td><pre class=example>Organic food in Ireland is certified by the <strong><abbr title="Irish Organic Farmers and Growers Association">IOFGA</abbr></strong>.</pre>
+ <tr><td><code><a href=#the-time-element>time</a></code>
+ <td>Date and/or time
+ <td><pre class=example>Published <strong><time>2009-10-21</time></strong>.</pre>
+
<tr><td><code><a href=#the-code-element>code</a></code>
<td>Computer code
<td><pre class=example>The <strong><code>fruitdb</code></strong> program can be used for tracking fruit production.</pre>
@@ -17061,10 +17068,6 @@
<td>Gauge
<td><pre class=example>Disk space remaining: <meter>75%<meter></pre>
- <tr><td><code><a href=#the-time-element>time</a></code>
- <td>Date and/or time
- <td><pre class=example>Published <strong><time>2009-10-21</time></strong>.</pre>
-
<tr><td><code><a href=#the-ruby-element>ruby</a></code>, <code><a href=#the-rt-element>rt</a></code>, <code><a href=#the-rp-element>rp</a></code>
<td>Ruby annotations
<td><pre class=example><strong><ruby> OJ <rp>(<rt>Orange Juice<rp>)</ruby></strong></pre>
Modified: source
===================================================================
--- source 2009-08-29 00:50:31 UTC (rev 3692)
+++ source 2009-08-29 00:53:55 UTC (rev 3693)
@@ -16440,6 +16440,270 @@
+
+ <h4>The <dfn><code>time</code></dfn> element</h4>
+
+ <dl class="element">
+ <dt>Categories</dt>
+ <dd><span>Flow content</span>.</dd>
+ <dd><span>Phrasing content</span>.</dd>
+ <dt>Contexts in which this element may be used:</dt>
+ <dd>Where <span>phrasing content</span> is expected.</dd>
+ <dt>Content model:</dt>
+ <dd><span>Phrasing content</span>, but there must be no <code>time</code> element descendants.</dd>
+ <dt>Content attributes:</dt>
+ <dd><span>Global attributes</span></dd>
+ <dd><code title="attr-time-datetime">datetime</code></dd>
+ <dt>DOM interface:</dt>
+ <dd>
+<pre class="idl">interface <dfn>HTMLTimeElement</dfn> : <span>HTMLElement</span> {
+ attribute DOMString <span title="dom-time-datetime">dateTime</span>;
+ readonly attribute <span>Date</span> <span title="dom-time-date">date</span>;
+ readonly attribute <span>Date</span> <span title="dom-time-time">time</span>;
+ readonly attribute <span>Date</span> <span title="dom-time-timezone">timezone</span>;
+};</pre>
+ </dd>
+ </dl>
+
+ <p>The <code>time</code> element <span>represents</span> 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
+ 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
+ them to the user's calendar. For example, adding birthday reminders
+ or scheduling events.</p>
+
+ <!-- it's also intended for restyling to local conventions
+ (2000-12-31 vs 31-12-2000 vs 12-31-2000), but CSS doesn't support
+ that yet. -->
+
+ <div class="note">
+
+ <p>The <code>time</code> element is not intended for encoding times
+ for which a precise date or time cannot be established. For
+ example, it would be inappropriate for encoding times like "one
+ millisecond after the big bang", "the early part of the Jurassic
+ period", or "a winter around 250 BCE".</p>
+
+ <p>For dates before the introduction of the Gregorian calendar,
+ authors are encouraged to not use the <code>time</code> element, or
+ else to be very careful about converting dates and times from the
+ period to the Gregorian calendar. This is complicated by the manner
+ in which the Gregorian calendar was phased in, which occurred at
+ different times in different countries, ranging from partway
+ through the 16th century all the way to early in the 20th.</p>
+
+ </div>
+
+ <p>The <dfn title="attr-time-datetime"><code>datetime</code></dfn>
+ attribute, if present, must contain a <span>valid date or time
+ string</span> that identifies the date or time being specified.</p>
+
+ <p>If the <code title="attr-time-datetime">datetime</code> attribute
+ is not present, then the date or time must be specified in the
+ content of the element, such that the element's
+ <code>textContent</code> is a <span>valid date or time string in
+ content</span>, and the date, if any, must be expressed using the
+ Gregorian calendar.</p>
+
+ <p>If the <code title="attr-time-datetime">datetime</code> attribute
+ is present, then the element may be empty, in which case the user
+ agent should convey the attribute's value to the user when rendering
+ the element.</p>
+
+ <div class="example">
+
+ <p>The <code>time</code> element can be used to encode dates, for
+ example in Microformats. The following shows a hypothetical way of
+ encoding an event using a variant on hCalendar that uses the
+ <code>time</code> element:</p>
+
+ <pre><div class="vevent">
+ <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
+ <span class="summary">Web 2.0 Conference</span>:
+ <time class="dtstart" datetime="2007-10-05">October 5</time> -
+ <time class="dtend" datetime="2007-10-20">19</time>,
+ at the <span class="location">Argent Hotel, San Francisco, CA</span>
+ </div></pre>
+
+ </div>
+
+ <div class="example">
+
+ <p>The <code>time</code> element is not necessary for encoding
+ dates or times. In the following snippet, the time is encoded using
+ <code>time</code>, so that it can be restyled (e.g. using XBL2) to
+ match local conventions, while the year is not marked up at all,
+ since marking it up would not be particularly useful.</p>
+
+ <pre><p>I usually have a snack at <time>16:00</time>.</p>
+<p>I've liked model trains since at least 1983.</p></pre>
+
+ <p>Using a styling technology that supports restyling times, the
+ first paragraph from the above snippet could be rendered as follows:</p>
+
+ <blockquote><p>I usually have a snack at 4pm.</p></blockquote>
+
+ <p>Or it could be rendered as follows:</p>
+
+ <blockquote><p>I usually have a snack at 16h00.</p></blockquote>
+
+ </div>
+
+ <div class="impl">
+
+ <p>The <dfn title="dom-time-datetime"><code>dateTime</code></dfn> DOM
+ attribute must <span>reflect</span> the <code
+ title="attr-time-datetime">datetime</code> content attribute.</p>
+
+ <p>User agents, to obtain the <dfn
+ title="concept-time-date">date</dfn>, <dfn
+ title="concept-time-time">time</dfn>, and <dfn
+ title="concept-time-timezone">time-zone offset</dfn> represented by
+ a <code>time</code> element, must follow these steps:</p>
+
+ <ol>
+
+ <li>If the <code title="attr-time-datetime">datetime</code>
+ attribute is present, then use the rules to <span>parse a date or
+ time string</span> with the flag <i>in attribute</i> from the value
+ of that attribute, and let the result be <var
+ title="">result</var>.</li>
+
+ <li>Otherwise, use the rules to <span>parse a date or time
+ string</span> with the flag <i>in content</i> from the element's
+ <code>textContent</code>, and let the result be <var
+ title="">result</var>.</li>
+
+ <li>If <var title="">result</var> is empty (because the parsing
+ failed), then the <span title="concept-time-date">date</span> is
+ unknown, the <span title="concept-time-time">time</span> is
+ unknown, and the <span title="concept-time-timezone">time-zone
+ offset</span> is unknown.</li>
+
+ <li>Otherwise: if <var title="">result</var> contains a date, then
+ that is the <span title="concept-time-date">date</span>; if <var
+ title="">result</var> contains a time, then that is the <span
+ title="concept-time-time">time</span>; and if <var
+ title="">result</var> contains a time-zone offset, then the
+ time-zone offset is the element's <span
+ title="concept-time-timezone">time-zone offset</span>. (A time-zone
+ offset can only be present if both a date and a time are also
+ present.)</li>
+
+ </ol>
+
+ </div>
+
+ <dl class="domintro">
+
+ <dt><var title="">time</var> . <code title="dom-time-date">date</code></dt>
+
+ <dd>
+
+ <p>Returns a <code>Date</code> object representing the date
+ component of the element's value, at midnight in the UTC
+ time zone.</p>
+
+ <p>Returns null if there is no date.</p>
+
+ </dd>
+
+ <dt><var title="">time</var> . <code title="dom-time-time">time</code></dt>
+
+ <dd>
+
+ <p>Returns a <code>Date</code> object representing the time
+ component of the element's value, on 1970-01-01 in the UTC
+ time zone.</p>
+
+ <p>Returns null if there is no time.</p>
+
+ </dd>
+
+ <dt><var title="">time</var> . <code title="dom-time-timezone">timezone</code></dt>
+
+ <dd>
+
+ <p>Returns a <code>Date</code> object representing the time
+ corresponding to 1970-01-01 00:00 UTC in the time zone given by the
+ element's value.</p>
+
+ <p>Returns null if there is no time zone.</p>
+
+ </dd>
+
+ </dl>
+
+ <div>
+
+ <p>The <dfn title="dom-time-date"><code>date</code></dfn> DOM
+ attribute must return null if the <span
+ title="concept-time-date">date</span> is unknown, and otherwise must
+ return the time corresponding to midnight UTC (i.e. the first
+ second) of the given <span
+ title="concept-time-date">date</span>.</p>
+
+ <p>The <dfn title="dom-time-time"><code>time</code></dfn> DOM attribute
+ must return null if the <span title="concept-time-time">time</span> is
+ unknown, and otherwise must return the time corresponding to the
+ given <span title="concept-time-time">time</span> of 1970-01-01, with
+ the time zone UTC.</p>
+
+ <p>The <dfn title="dom-time-timezone"><code>timezone</code></dfn>
+ DOM attribute must return null if the <span
+ title="concept-time-timezone">time-zone offset</span> is unknown,
+ and otherwise must return the time corresponding to 1970-01-01 00:00
+ UTC in the given <span title="concept-time-timezone">time-zone
+ offset</span>, 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>
+
+ <div class="example">
+
+ <p>In the following snippet:</p>
+
+ <pre><p>Our first date was <time datetime="2006-09-23">a Saturday</time>.</p></pre>
+
+ <p>...the <code>time</code> element's <code
+ title="dom-time-date">date</code> attribute would have the value
+ 1,158,969,600,000ms, and the <code title="dom-time-time">time</code>
+ and <code title="dom-time-timezone">timezone</code> attributes would
+ return null.</p>
+
+
+ <p>In the following snippet:</p>
+
+ <pre><p>We stopped talking at <time datetime="2006-09-24T05:00-07:00">5am the next morning</time>.</p></pre>
+
+ <p>...the <code>time</code> element's <code
+ title="dom-time-date">date</code> attribute would have the value
+ 1,159,056,000,000ms, the <code title="dom-time-time">time</code>
+ attribute would have the value 18,000,000ms, and the <code
+ title="dom-time-timezone">timezone</code> attribute would return
+ −25,200,000ms. To obtain the actual time, the three attributes can
+ be added together, obtaining 1,159,048,800,000, which is the
+ specified date and time in UTC.</p>
+
+
+ <p>Finally, in the following snippet:</p>
+
+ <pre><p>Many people get up at <time>08:00</time>.</p></pre>
+
+ <p>...the <code>time</code> element's <code
+ title="dom-time-date">date</code> attribute would have the value null,
+ the <code title="dom-time-time">time</code> attribute would have the
+ value 28,800,000ms, and the <code
+ title="dom-time-timezone">timezone</code> attribute would return
+ null.</p>
+
+ </div>
+
+
+
<h4>The <dfn><code>code</code></dfn> element</h4>
<dl class="element">
@@ -17206,7 +17470,7 @@
<h4>The <dfn><code>meter</code></dfn> element</h4>
- <!-- XXX Keep this after <progress> and NOT close to <time> -->
+ <!-- Keep this after <progress> and NOT close to <time> -->
<dl class="element">
<dt>Categories</dt>
@@ -17695,269 +17959,8 @@
</div>
- <h4>The <dfn><code>time</code></dfn> element</h4>
- <dl class="element">
- <dt>Categories</dt>
- <dd><span>Flow content</span>.</dd>
- <dd><span>Phrasing content</span>.</dd>
- <dt>Contexts in which this element may be used:</dt>
- <dd>Where <span>phrasing content</span> is expected.</dd>
- <dt>Content model:</dt>
- <dd><span>Phrasing content</span>, but there must be no <code>time</code> element descendants.</dd>
- <dt>Content attributes:</dt>
- <dd><span>Global attributes</span></dd>
- <dd><code title="attr-time-datetime">datetime</code></dd>
- <dt>DOM interface:</dt>
- <dd>
-<pre class="idl">interface <dfn>HTMLTimeElement</dfn> : <span>HTMLElement</span> {
- attribute DOMString <span title="dom-time-datetime">dateTime</span>;
- readonly attribute <span>Date</span> <span title="dom-time-date">date</span>;
- readonly attribute <span>Date</span> <span title="dom-time-time">time</span>;
- readonly attribute <span>Date</span> <span title="dom-time-timezone">timezone</span>;
-};</pre>
- </dd>
- </dl>
- <p>The <code>time</code> element <span>represents</span> 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
- 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
- them to the user's calendar. For example, adding birthday reminders
- or scheduling events.</p>
-
- <!-- it's also intended for restyling to local conventions
- (2000-12-31 vs 31-12-2000 vs 12-31-2000), but CSS doesn't support
- that yet. -->
-
- <div class="note">
-
- <p>The <code>time</code> element is not intended for encoding times
- for which a precise date or time cannot be established. For
- example, it would be inappropriate for encoding times like "one
- millisecond after the big bang", "the early part of the Jurassic
- period", or "a winter around 250 BCE".</p>
-
- <p>For dates before the introduction of the Gregorian calendar,
- authors are encouraged to not use the <code>time</code> element, or
- else to be very careful about converting dates and times from the
- period to the Gregorian calendar. This is complicated by the manner
- in which the Gregorian calendar was phased in, which occurred at
- different times in different countries, ranging from partway
- through the 16th century all the way to early in the 20th.</p>
-
- </div>
-
- <p>The <dfn title="attr-time-datetime"><code>datetime</code></dfn>
- attribute, if present, must contain a <span>valid date or time
- string</span> that identifies the date or time being specified.</p>
-
- <p>If the <code title="attr-time-datetime">datetime</code> attribute
- is not present, then the date or time must be specified in the
- content of the element, such that the element's
- <code>textContent</code> is a <span>valid date or time string in
- content</span>, and the date, if any, must be expressed using the
- Gregorian calendar.</p>
-
- <p>If the <code title="attr-time-datetime">datetime</code> attribute
- is present, then the element may be empty, in which case the user
- agent should convey the attribute's value to the user when rendering
- the element.</p>
-
- <div class="example">
-
- <p>The <code>time</code> element can be used to encode dates, for
- example in Microformats. The following shows a hypothetical way of
- encoding an event using a variant on hCalendar that uses the
- <code>time</code> element:</p>
-
- <pre><div class="vevent">
- <a class="url" href="http://www.web2con.com/">http://www.web2con.com/</a>
- <span class="summary">Web 2.0 Conference</span>:
- <time class="dtstart" datetime="2007-10-05">October 5</time> -
- <time class="dtend" datetime="2007-10-20">19</time>,
- at the <span class="location">Argent Hotel, San Francisco, CA</span>
- </div></pre>
-
- </div>
-
- <div class="example">
-
- <p>The <code>time</code> element is not necessary for encoding
- dates or times. In the following snippet, the time is encoded using
- <code>time</code>, so that it can be restyled (e.g. using XBL2) to
- match local conventions, while the year is not marked up at all,
- since marking it up would not be particularly useful.</p>
-
- <pre><p>I usually have a snack at <time>16:00</time>.</p>
-<p>I've liked model trains since at least 1983.</p></pre>
-
- <p>Using a styling technology that supports restyling times, the
- first paragraph from the above snippet could be rendered as follows:</p>
-
- <blockquote><p>I usually have a snack at 4pm.</p></blockquote>
-
- <p>Or it could be rendered as follows:</p>
-
- <blockquote><p>I usually have a snack at 16h00.</p></blockquote>
-
- </div>
-
- <div class="impl">
-
- <p>The <dfn title="dom-time-datetime"><code>dateTime</code></dfn> DOM
- attribute must <span>reflect</span> the <code
- title="attr-time-datetime">datetime</code> content attribute.</p>
-
- <p>User agents, to obtain the <dfn
- title="concept-time-date">date</dfn>, <dfn
- title="concept-time-time">time</dfn>, and <dfn
- title="concept-time-timezone">time-zone offset</dfn> represented by
- a <code>time</code> element, must follow these steps:</p>
-
- <ol>
-
- <li>If the <code title="attr-time-datetime">datetime</code>
- attribute is present, then use the rules to <span>parse a date or
- time string</span> with the flag <i>in attribute</i> from the value
- of that attribute, and let the result be <var
- title="">result</var>.</li>
-
- <li>Otherwise, use the rules to <span>parse a date or time
- string</span> with the flag <i>in content</i> from the element's
- <code>textContent</code>, and let the result be <var
- title="">result</var>.</li>
-
- <li>If <var title="">result</var> is empty (because the parsing
- failed), then the <span title="concept-time-date">date</span> is
- unknown, the <span title="concept-time-time">time</span> is
- unknown, and the <span title="concept-time-timezone">time-zone
- offset</span> is unknown.</li>
-
- <li>Otherwise: if <var title="">result</var> contains a date, then
- that is the <span title="concept-time-date">date</span>; if <var
- title="">result</var> contains a time, then that is the <span
- title="concept-time-time">time</span>; and if <var
- title="">result</var> contains a time-zone offset, then the
- time-zone offset is the element's <span
- title="concept-time-timezone">time-zone offset</span>. (A time-zone
- offset can only be present if both a date and a time are also
- present.)</li>
-
- </ol>
-
- </div>
-
- <dl class="domintro">
-
- <dt><var title="">time</var> . <code title="dom-time-date">date</code></dt>
-
- <dd>
-
- <p>Returns a <code>Date</code> object representing the date
- component of the element's value, at midnight in the UTC
- time zone.</p>
-
- <p>Returns null if there is no date.</p>
-
- </dd>
-
- <dt><var title="">time</var> . <code title="dom-time-time">time</code></dt>
-
- <dd>
-
- <p>Returns a <code>Date</code> object representing the time
- component of the element's value, on 1970-01-01 in the UTC
- time zone.</p>
-
- <p>Returns null if there is no time.</p>
-
- </dd>
-
- <dt><var title="">time</var> . <code title="dom-time-timezone">timezone</code></dt>
-
- <dd>
-
- <p>Returns a <code>Date</code> object representing the time
- corresponding to 1970-01-01 00:00 UTC in the time zone given by the
- element's value.</p>
-
- <p>Returns null if there is no time zone.</p>
-
- </dd>
-
- </dl>
-
- <div>
-
- <p>The <dfn title="dom-time-date"><code>date</code></dfn> DOM
- attribute must return null if the <span
- title="concept-time-date">date</span> is unknown, and otherwise must
- return the time corresponding to midnight UTC (i.e. the first
- second) of the given <span
- title="concept-time-date">date</span>.</p>
-
- <p>The <dfn title="dom-time-time"><code>time</code></dfn> DOM attribute
- must return null if the <span title="concept-time-time">time</span> is
- unknown, and otherwise must return the time corresponding to the
- given <span title="concept-time-time">time</span> of 1970-01-01, with
- the time zone UTC.</p>
-
- <p>The <dfn title="dom-time-timezone"><code>timezone</code></dfn>
- DOM attribute must return null if the <span
- title="concept-time-timezone">time-zone offset</span> is unknown,
- and otherwise must return the time corresponding to 1970-01-01 00:00
- UTC in the given <span title="concept-time-timezone">time-zone
- offset</span>, 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>
-
- <div class="example">
-
- <p>In the following snippet:</p>
-
- <pre><p>Our first date was <time datetime="2006-09-23">a Saturday</time>.</p></pre>
-
- <p>...the <code>time</code> element's <code
- title="dom-time-date">date</code> attribute would have the value
- 1,158,969,600,000ms, and the <code title="dom-time-time">time</code>
- and <code title="dom-time-timezone">timezone</code> attributes would
- return null.</p>
-
-
- <p>In the following snippet:</p>
-
- <pre><p>We stopped talking at <time datetime="2006-09-24T05:00-07:00">5am the next morning</time>.</p></pre>
-
- <p>...the <code>time</code> element's <code
- title="dom-time-date">date</code> attribute would have the value
- 1,159,056,000,000ms, the <code title="dom-time-time">time</code>
- attribute would have the value 18,000,000ms, and the <code
- title="dom-time-timezone">timezone</code> attribute would return
- −25,200,000ms. To obtain the actual time, the three attributes can
- be added together, obtaining 1,159,048,800,000, which is the
- specified date and time in UTC.</p>
-
-
- <p>Finally, in the following snippet:</p>
-
- <pre><p>Many people get up at <time>08:00</time>.</p></pre>
-
- <p>...the <code>time</code> element's <code
- title="dom-time-date">date</code> attribute would have the value null,
- the <code title="dom-time-time">time</code> attribute would have the
- value 28,800,000ms, and the <code
- title="dom-time-timezone">timezone</code> attribute would return
- null.</p>
-
- </div>
-
-
-
<h4>The <dfn><code>ruby</code></dfn> element</h4>
<dl class="element">
@@ -18271,6 +18274,11 @@
<td><pre class="example">Organic food in Ireland is certified by the <strong><abbr title="Irish Organic Farmers and Growers Association">IOFGA</abbr></strong>.</pre>
<tr>
+ <td><code>time</code>
+ <td>Date and/or time
+ <td><pre class="example">Published <strong><time>2009-10-21</time></strong>.</pre>
+
+ <tr>
<td><code>code</code>
<td>Computer code
<td><pre class="example">The <strong><code>fruitdb</code></strong> program can be used for tracking fruit production.</pre>
@@ -18326,11 +18334,6 @@
<td><pre class="example">Disk space remaining: <meter>75%<meter></pre>
<tr>
- <td><code>time</code>
- <td>Date and/or time
- <td><pre class="example">Published <strong><time>2009-10-21</time></strong>.</pre>
-
- <tr>
<td><code>ruby</code>, <code>rt</code>, <code>rp</code>
<td>Ruby annotations
<td><pre class="example"><strong><ruby> OJ <rp>(<rt>Orange Juice<rp>)</ruby></strong></pre>
More information about the Commit-Watchers
mailing list