- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 29 Aug 2009 00:52:01 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv20364 Modified Files: Overview.html Log Message: Move <time> away from <meter>. (whatwg r3693) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.2871 retrieving revision 1.2872 diff -u -d -r1.2871 -r1.2872 --- Overview.html 29 Aug 2009 00:48:34 -0000 1.2871 +++ Overview.html 29 Aug 2009 00:51:58 -0000 1.2872 @@ -500,17 +500,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> @@ -13443,7 +13443,213 @@ cause other <code><a href="#the-abbr-element">abbr</a></code> elements in the same document with the same contents but without a <code title="attr-title"><a href="#the-title-attribute">title</a></code> attribute to behave as if they had the same expansion. Every - <code><a href="#the-abbr-element">abbr</a></code> element is independent.<h4 id="the-code-element"><span class="secno">4.6.9 </span>The <dfn><code>code</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + <code><a href="#the-abbr-element">abbr</a></code> element is independent.<h4 id="the-time-element"><span class="secno">4.6.9 </span>The <dfn><code>time</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><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>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>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>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.<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><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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> @@ -13492,7 +13698,7 @@ <p>A class is used in that example to indicate the language used.</p> - </div><p class="note">See the <code><a href="#the-pre-element">pre</a></code> element for more details.<h4 id="the-var-element"><span class="secno">4.6.10 </span>The <dfn><code>var</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + </div><p class="note">See the <code><a href="#the-pre-element">pre</a></code> element for more details.<h4 id="the-var-element"><span class="secno">4.6.11 </span>The <dfn><code>var</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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> @@ -13539,7 +13745,7 @@ </figure></pre> - </div><h4 id="the-samp-element"><span class="secno">4.6.11 </span>The <dfn><code>samp</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + </div><h4 id="the-samp-element"><span class="secno">4.6.12 </span>The <dfn><code>samp</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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> @@ -13568,7 +13774,7 @@ Linux demo 2.6.10-grsec+gg3+e+fhs6b+nfs+gr0501+++p3+c4a+gr2b-reslog-v6.189 #1 SMP Tue Feb 1 11:22:36 PST 2005 i686 unknown <span class="prompt">jdoe@demo:~$</span> <span class="cursor">_</span></samp></pre></pre> - </div><h4 id="the-kbd-element"><span class="secno">4.6.12 </span>The <dfn><code>kbd</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + </div><h4 id="the-kbd-element"><span class="secno">4.6.13 </span>The <dfn><code>kbd</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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> @@ -13606,7 +13812,7 @@ <pre><p>To make George eat an apple, select <kbd>File | Eat Apple...</kbd></p></pre> - </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><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + </div><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><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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 these elements may be used:</dt> @@ -13648,7 +13854,7 @@ detailed mathematical markup is not desired. <a href="#refsMATHML">[MATHML]</a><div class="example"> <pre><var>E</var>=<var>m</var><var>c</var><sup>2</sup></pre> <pre>f(<var>x</var>, <var>n</var>) = log<sub>4</sub><var>x</var><sup><var>n</var></sup></pre> - </div><h4 id="the-i-element"><span class="secno">4.6.14 </span>The <dfn><code>i</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + </div><h4 id="the-i-element"><span class="secno">4.6.15 </span>The <dfn><code>i</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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> @@ -13694,7 +13900,7 @@ up the defining instance of a term.<p class="note">Style sheets can be used to format <code><a href="#the-i-element">i</a></code> elements, just like any other element can be restyled. Thus, it is not the case that content in <code><a href="#the-i-element">i</a></code> elements will - necessarily be italicized.<h4 id="the-b-element"><span class="secno">4.6.15 </span>The <dfn><code>b</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><dl class="element"><dt>Categories</dt> + necessarily be italicized.<h4 id="the-b-element"><span class="secno">4.6.16 </span>The <dfn><code>b</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Implemented and widely deployed</i><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> @@ -13745,7 +13951,7 @@ </div><p class="note">Style sheets can be used to format <code><a href="#the-b-element">b</a></code> elements, just like any other element can be restyled. Thus, it is not the case that content in <code><a href="#the-b-element">b</a></code> elements will - necessarily be boldened.<h4 id="the-mark-element"><span class="secno">4.6.16 </span>The <dfn><code>mark</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><dl class="element"><dt>Categories</dt> + necessarily be boldened.<h4 id="the-mark-element"><span class="secno">4.6.17 </span>The <dfn><code>mark</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><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> @@ -13865,7 +14071,7 @@ <p><mark>An obstruction in a gate will prevent it from accepting a wormhole connection.</mark></p></pre> - </div><h4 id="the-progress-element"><span class="secno">4.6.17 </span>The <dfn><code>progress</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><dl class="element"><dt>Categories</dt> + </div><h4 id="the-progress-element"><span class="secno">4.6.18 </span>The <dfn><code>progress</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><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> @@ -14026,7 +14232,7 @@ attribute must return −1. Otherwise, it must return the result of dividing the current value by the maximum value.</p> - </div><h4 id="the-meter-element"><span class="secno">4.6.18 </span>The <dfn><code>meter</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i></p><!-- XXX Keep this after <progress> and NOT close to <time> --><dl class="element"><dt>Categories</dt> + </div><h4 id="the-meter-element"><span class="secno">4.6.19 </span>The <dfn><code>meter</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i></p><!-- Keep this after <progress> and NOT close to <time> --><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> @@ -14423,212 +14629,6 @@ attributes must return zero. The value parsed from the <code>textContent</code> never affects the DOM values.</p> - </div><h4 id="the-time-element"><span class="secno">4.6.19 </span>The <dfn><code>time</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Working draft</i><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>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>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>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.<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><p class="XXX annotation"><b>Status: </b><i>Working draft</i><dl class="element"><dt>Categories</dt> <dd><a href="#flow-content">Flow content</a>.</dd> <dd><a href="#phrasing-content">Phrasing content</a>.</dd> @@ -14855,6 +14855,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> @@ -14899,10 +14903,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> @@ -15335,7 +15335,7 @@ <legend>The castle through the ages: 1423, 1858, and 1999 respectively.</legend> </figure></pre> - </div><h4 id="the-img-element"><span class="secno">4.8.2 </span>The <dfn><code>img</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/66">ISSUE-66</a> (image-analysis) and <a href="http://www.w3.org/html/wg/tracker/issues/30">ISSUE-30</a> (longdesc) block progress to Last Call</span><dl class="element"><dt>Categories</dt> + </div><h4 id="the-img-element"><span class="secno">4.8.2 </span>The <dfn><code>img</code></dfn> element</h4><p class="XXX annotation"><b>Status: </b><i>Last call for comments. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/30">ISSUE-30</a> (longdesc) and <a href="http://www.w3.org/html/wg/tracker/issues/66">ISSUE-66</a> (image-analysis) block progress to Last Call</span><dl class="element"><dt>Categories</dt> <dd><a href="#flow-content">Flow content</a>.</dd> <dd><a href="#phrasing-content">Phrasing content</a>.</dd> <dd><a href="#embedded-content">Embedded content</a>.</dd> @@ -48382,7 +48382,7 @@ <a href="#source-browsing-context">source browsing context</a>.</p> - <h5 id="hyperlink-auditing"><span class="secno">6.12.2.1 </span><dfn>Hyperlink auditing</dfn></h5><p class="XXX annotation"><b>Status: </b><i>Controversial Working Draft. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/1">ISSUE-1</a> (PINGPOST), <a href="http://www.w3.org/html/wg/tracker/issues/2">ISSUE-2</a> (PINGUI) and <a href="http://www.w3.org/html/wg/tracker/issues/63">ISSUE-63</a> (origin-req-scope) block progress to Last Call</span></p> + <h5 id="hyperlink-auditing"><span class="secno">6.12.2.1 </span><dfn>Hyperlink auditing</dfn></h5><p class="XXX annotation"><b>Status: </b><i>Controversial Working Draft. </i><span><a href="http://www.w3.org/html/wg/tracker/issues/1">ISSUE-1</a> (PINGPOST), <a href="http://www.w3.org/html/wg/tracker/issues/63">ISSUE-63</a> (origin-req-scope) and <a href="http://www.w3.org/html/wg/tracker/issues/2">ISSUE-2</a> (PINGUI) block progress to Last Call</span></p> <p>If an <code><a href="#the-a-element">a</a></code> or <code><a href="#the-area-element">area</a></code> hyperlink element has a <code title="attr-hyperlink-ping"><a href="#ping">ping</a></code> attribute, and the
Received on Saturday, 29 August 2009 00:52:12 UTC