- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 04 Sep 2009 07:44:28 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv4030
Modified Files:
Overview.html
Log Message:
Make <time> have just a .valueAsDate attribute instead of .date/.time/.timezone, since people prefer just one attribute. (whatwg r3750)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2920
retrieving revision 1.2921
diff -u -d -r1.2920 -r1.2921
--- Overview.html 4 Sep 2009 07:28:14 -0000 1.2920
+++ Overview.html 4 Sep 2009 07:44:24 -0000 1.2921
@@ -13543,9 +13543,7 @@
<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>;
attribute boolean <a href="#dom-time-pubdate" title="dom-time-pubDate">pubDate</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>;
+ readonly attribute <span>Date</span> <a href="#dom-time-valueasdate" title="dom-time-valueAsDate">valueAsDate</a>;
};</pre>
</dd>
</dl><p>The <code><a href="#the-time-element">time</a></code> element <a href="#represents">represents</a> either a
@@ -13668,61 +13666,46 @@
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>
+ </ol></div><dl class="domintro"><dt><var title="">time</var> . <code title="dom-time-valueAsDate"><a href="#dom-time-valueasdate">valueAsDate</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>
+ <p>Returns a <code>Date</code> object representing the specified date and time.</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>
+ </dl><div>
- </dd>
+ <p>The <dfn id="dom-time-valueasdate" title="dom-time-valueAsDate"><code>valueAsDate</code></dfn> IDL
+ attribute must return either null or a <code>Date</code> object
+ initialised to the relevant value as defined by the following
+ list:</p>
- <dt><var title="">time</var> . <code title="dom-time-timezone"><a href="#dom-time-timezone">timezone</a></code></dt>
+ <dl><dt>If the <a href="#concept-time-date" title="concept-time-date">date</a> is known but
+ the <a href="#concept-time-time" title="concept-time-time">time</a> is not</dt>
- <dd>
+ <dd>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>.</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>
+ <dt>If the <a href="#concept-time-time" title="concept-time-time">time</a> is known but
+ the <a href="#concept-time-date" title="concept-time-date">date</a> is not</dt>
- <p>Returns null if there is no time zone.</p>
+ <dd>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.</dd>
- </dd>
+ <dt>If both the <a href="#concept-time-date" title="concept-time-date">date</a> and the
+ <a href="#concept-time-time" title="concept-time-time">time</a> are known</dt>
- </dl><div>
+ <dd>The time corresponding to the <a href="#concept-time-date" title="concept-time-date">date</a> and <a href="#concept-time-time" title="concept-time-time">time</a>, with the given <a href="#concept-time-timezone" title="concept-time-timezone">time-zone offset</a>.
- <p>The <dfn id="dom-time-date" title="dom-time-date"><code>date</code></dfn> IDL
- 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>
+ <dt>If neither the <a href="#concept-time-date" title="concept-time-date">date</a> nor
+ the <a href="#concept-time-time" title="concept-time-time">time</a> are known</dt>
- <p>The <dfn id="dom-time-time" title="dom-time-time"><code>time</code></dfn> IDL 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>
+ <dd>The null value.</dd>
- <p>The <dfn id="dom-time-timezone" title="dom-time-timezone"><code>timezone</code></dfn>
- IDL 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>
+ </dl><p>The same <code>Date</code> object must be returned until the
+ <code title="attr-time-datetime"><a href="#attr-time-datetime">datetime</a></code> attribute is
+ removed or changed.</p>
</div><div class="example">
@@ -13730,32 +13713,17 @@
<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>...the <code><a href="#the-time-element">time</a></code> element's <code title="dom-time-valueAsDate"><a href="#dom-time-valueasdate">valueAsDate</a></code> attribute would
+ have the value 1,158,969,600,000ms.</p>
+ </div><!-- <pre><p>We stopped talking at <time datetime="2006-09-24T05:00-07:00">5am the next morning</time>.</p></pre> --><div class="example">
<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>
+ <p>...the <code><a href="#the-time-element">time</a></code> element's <code title="dom-time-valueAsDate"><a href="#dom-time-valueasdate">valueAsDate</a></code> attribute would
+ have the value 28,800,000ms.</p>
</div><div class="example">
Received on Friday, 4 September 2009 07:44:41 UTC