[html5] r6893 - [giow] (0) Define how to convert a time to a Date object if it's not a round num [...]
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jan 11 16:03:12 PST 2012
Author: ianh
Date: 2012-01-11 16:03:10 -0800 (Wed, 11 Jan 2012)
New Revision: 6893
Modified:
complete.html
index
source
Log:
[giow] (0) Define how to convert a time to a Date object if it's not a round number of milliseconds.
Affected topics: DOM APIs, HTML, Video and Audio
Modified: complete.html
===================================================================
--- complete.html 2012-01-11 23:14:54 UTC (rev 6892)
+++ complete.html 2012-01-12 00:03:10 UTC (rev 6893)
@@ -240,7 +240,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 11 January 2012</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 12 January 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -3959,6 +3959,20 @@
is passed an Infinity or Not-a-Number (NaN) value, a
<code><a href=#notsupportederror>NotSupportedError</a></code> exception must be raised.</p>
+ <p>When this specification requires a user agent to <dfn id=create-a-date-object>create a
+ <code>Date</code> object</dfn> representing a particular time, the
+ milliseconds component of that time, if any, must be truncated to
+ an integer and the time value of the newly created
+ <code>Date</code> object must represent the time after that
+ truncation.</p>
+
+ <p class=example>For instance, given the time 23045 millionths
+ of a second after 01:00 UTC on January 1st 2000, i.e. the time
+ 2000-01-01T00:00:00.023045Z, then the <code>Date</code> object
+ created representing that time would represent the same time as
+ that created representing the time 2000-01-01T00:00:00.023Z, 45
+ millionths earlier.</p>
+
</dd>
<dt>Typed Arrays</dt>
@@ -29304,8 +29318,9 @@
<a href=#timeline-offset>timeline offset</a> must be set to Not-a-Number (NaN).</p>
<p>The <dfn id=dom-media-startoffsettime title=dom-media-startOffsetTime><code>startOffsetTime</code></dfn>
- attribute must return a new <code>Date</code> object representing
- the current <a href=#timeline-offset>timeline offset</a>.</p>
+ attribute must return <a href=#create-a-date-object title="create a Date object">a new
+ <code>Date</code> object</a> representing the current
+ <a href=#timeline-offset>timeline offset</a>.</p>
</div>
@@ -44565,9 +44580,9 @@
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-global-date-and-time-string title="parse
a global date and time string">parsing a global date and time</a>
from <var title="">input</var> results in an error, then return an
- error; otherwise, return a <code>Date</code> object representing the
- parsed <a href=#concept-datetime title=concept-datetime>global date and time</a>,
- expressed in UTC.</p>
+ error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new
+ <code>Date</code> object</a> representing the parsed <a href=#concept-datetime title=concept-datetime>global date and time</a>, expressed in
+ UTC.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -44764,9 +44779,8 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-date-string title="parse
a date string">parsing a date</a> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing midnight UTC on the morning of
- the parsed <a href=#concept-date title=concept-date>date</a>.</p>
+ results in an error, then return an error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a>
+ representing midnight UTC on the morning of the parsed <a href=#concept-date title=concept-date>date</a>.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -44921,8 +44935,9 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-month-string title="parse
a month string">parsing a month</a> from <var title="">input</var> results in an error, then return an error;
- otherwise, return a <code>Date</code> object representing midnight
- UTC on the morning of the first day of the parsed <a href=#concept-month title=concept-month>month</a>.</p>
+ otherwise, return <a href=#create-a-date-object title="create a Date object">a new
+ <code>Date</code> object</a> representing midnight UTC on the
+ morning of the first day of the parsed <a href=#concept-month title=concept-month>month</a>.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -45074,9 +45089,9 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-week-string title="parse
a week string">parsing a week</a> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing midnight UTC on the morning of
- the Monday of the parsed <a href=#concept-week title=concept-week>week</a>.</p>
+ results in an error, then return an error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a>
+ representing midnight UTC on the morning of the Monday of the parsed
+ <a href=#concept-week title=concept-week>week</a>.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -45227,8 +45242,9 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-time-string title="parse
a time string">parsing a time</a> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing the parsed <a href=#concept-time title=concept-time>time</a> in UTC on 1970-01-01.</p>
+ results in an error, then return an error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a>
+ representing the parsed <a href=#concept-time title=concept-time>time</a> in
+ UTC on 1970-01-01.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
Modified: index
===================================================================
--- index 2012-01-11 23:14:54 UTC (rev 6892)
+++ index 2012-01-12 00:03:10 UTC (rev 6893)
@@ -240,7 +240,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 11 January 2012</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 12 January 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -3959,6 +3959,20 @@
is passed an Infinity or Not-a-Number (NaN) value, a
<code><a href=#notsupportederror>NotSupportedError</a></code> exception must be raised.</p>
+ <p>When this specification requires a user agent to <dfn id=create-a-date-object>create a
+ <code>Date</code> object</dfn> representing a particular time, the
+ milliseconds component of that time, if any, must be truncated to
+ an integer and the time value of the newly created
+ <code>Date</code> object must represent the time after that
+ truncation.</p>
+
+ <p class=example>For instance, given the time 23045 millionths
+ of a second after 01:00 UTC on January 1st 2000, i.e. the time
+ 2000-01-01T00:00:00.023045Z, then the <code>Date</code> object
+ created representing that time would represent the same time as
+ that created representing the time 2000-01-01T00:00:00.023Z, 45
+ millionths earlier.</p>
+
</dd>
<dt>Typed Arrays</dt>
@@ -29304,8 +29318,9 @@
<a href=#timeline-offset>timeline offset</a> must be set to Not-a-Number (NaN).</p>
<p>The <dfn id=dom-media-startoffsettime title=dom-media-startOffsetTime><code>startOffsetTime</code></dfn>
- attribute must return a new <code>Date</code> object representing
- the current <a href=#timeline-offset>timeline offset</a>.</p>
+ attribute must return <a href=#create-a-date-object title="create a Date object">a new
+ <code>Date</code> object</a> representing the current
+ <a href=#timeline-offset>timeline offset</a>.</p>
</div>
@@ -44565,9 +44580,9 @@
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-global-date-and-time-string title="parse
a global date and time string">parsing a global date and time</a>
from <var title="">input</var> results in an error, then return an
- error; otherwise, return a <code>Date</code> object representing the
- parsed <a href=#concept-datetime title=concept-datetime>global date and time</a>,
- expressed in UTC.</p>
+ error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new
+ <code>Date</code> object</a> representing the parsed <a href=#concept-datetime title=concept-datetime>global date and time</a>, expressed in
+ UTC.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -44764,9 +44779,8 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-date-string title="parse
a date string">parsing a date</a> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing midnight UTC on the morning of
- the parsed <a href=#concept-date title=concept-date>date</a>.</p>
+ results in an error, then return an error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a>
+ representing midnight UTC on the morning of the parsed <a href=#concept-date title=concept-date>date</a>.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -44921,8 +44935,9 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-month-string title="parse
a month string">parsing a month</a> from <var title="">input</var> results in an error, then return an error;
- otherwise, return a <code>Date</code> object representing midnight
- UTC on the morning of the first day of the parsed <a href=#concept-month title=concept-month>month</a>.</p>
+ otherwise, return <a href=#create-a-date-object title="create a Date object">a new
+ <code>Date</code> object</a> representing midnight UTC on the
+ morning of the first day of the parsed <a href=#concept-month title=concept-month>month</a>.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -45074,9 +45089,9 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-week-string title="parse
a week string">parsing a week</a> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing midnight UTC on the morning of
- the Monday of the parsed <a href=#concept-week title=concept-week>week</a>.</p>
+ results in an error, then return an error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a>
+ representing midnight UTC on the morning of the Monday of the parsed
+ <a href=#concept-week title=concept-week>week</a>.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
@@ -45227,8 +45242,9 @@
<p><strong>The <a href=#concept-input-value-string-date title=concept-input-value-string-date>algorithm to convert a
string to a <code>Date</code> object</a>, given a string <var title="">input</var>, is as follows</strong>: If <a href=#parse-a-time-string title="parse
a time string">parsing a time</a> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing the parsed <a href=#concept-time title=concept-time>time</a> in UTC on 1970-01-01.</p>
+ results in an error, then return an error; otherwise, return <a href=#create-a-date-object title="create a Date object">a new <code>Date</code> object</a>
+ representing the parsed <a href=#concept-time title=concept-time>time</a> in
+ UTC on 1970-01-01.</p>
<p><strong>The <a href=#concept-input-value-date-string title=concept-input-value-date-string>algorithm to convert a
<code>Date</code> object to a string</a>, given a
Modified: source
===================================================================
--- source 2012-01-11 23:14:54 UTC (rev 6892)
+++ source 2012-01-12 00:03:10 UTC (rev 6893)
@@ -2925,6 +2925,20 @@
is passed an Infinity or Not-a-Number (NaN) value, a
<code>NotSupportedError</code> exception must be raised.</p>
+ <p>When this specification requires a user agent to <dfn>create a
+ <code>Date</code> object</dfn> representing a particular time, the
+ milliseconds component of that time, if any, must be truncated to
+ an integer and the time value of the newly created
+ <code>Date</code> object must represent the time after that
+ truncation.</p>
+
+ <p class="example">For instance, given the time 23045 millionths
+ of a second after 01:00 UTC on January 1st 2000, i.e. the time
+ 2000-01-01T00:00:00.023045Z, then the <code>Date</code> object
+ created representing that time would represent the same time as
+ that created representing the time 2000-01-01T00:00:00.023Z, 45
+ millionths earlier.</p>
+
</dd>
<dt>Typed Arrays</dt>
@@ -31831,8 +31845,9 @@
<p>The <dfn
title="dom-media-startOffsetTime"><code>startOffsetTime</code></dfn>
- attribute must return a new <code>Date</code> object representing
- the current <span>timeline offset</span>.</p>
+ attribute must return <span title="create a Date object">a new
+ <code>Date</code> object</span> representing the current
+ <span>timeline offset</span>.</p>
</div>
@@ -51979,9 +51994,10 @@
title="">input</var>, is as follows</strong>: If <span title="parse
a global date and time string">parsing a global date and time</span>
from <var title="">input</var> results in an error, then return an
- error; otherwise, return a <code>Date</code> object representing the
- parsed <span title="concept-datetime">global date and time</span>,
- expressed in UTC.</p>
+ error; otherwise, return <span title="create a Date object">a new
+ <code>Date</code> object</span> representing the parsed <span
+ title="concept-datetime">global date and time</span>, expressed in
+ UTC.</p>
<p><strong>The <span
title="concept-input-value-date-string">algorithm to convert a
@@ -52203,9 +52219,10 @@
string to a <code>Date</code> object</span>, given a string <var
title="">input</var>, is as follows</strong>: If <span title="parse
a date string">parsing a date</span> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing midnight UTC on the morning of
- the parsed <span title="concept-date">date</span>.</p>
+ results in an error, then return an error; otherwise, return <span
+ title="create a Date object">a new <code>Date</code> object</span>
+ representing midnight UTC on the morning of the parsed <span
+ title="concept-date">date</span>.</p>
<p><strong>The <span
title="concept-input-value-date-string">algorithm to convert a
@@ -52382,8 +52399,9 @@
title="">input</var>, is as follows</strong>: If <span title="parse
a month string">parsing a month</span> from <var
title="">input</var> results in an error, then return an error;
- otherwise, return a <code>Date</code> object representing midnight
- UTC on the morning of the first day of the parsed <span
+ otherwise, return <span title="create a Date object">a new
+ <code>Date</code> object</span> representing midnight UTC on the
+ morning of the first day of the parsed <span
title="concept-month">month</span>.</p>
<p><strong>The <span
@@ -52559,9 +52577,10 @@
string to a <code>Date</code> object</span>, given a string <var
title="">input</var>, is as follows</strong>: If <span title="parse
a week string">parsing a week</span> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing midnight UTC on the morning of
- the Monday of the parsed <span title="concept-week">week</span>.</p>
+ results in an error, then return an error; otherwise, return <span
+ title="create a Date object">a new <code>Date</code> object</span>
+ representing midnight UTC on the morning of the Monday of the parsed
+ <span title="concept-week">week</span>.</p>
<p><strong>The <span
title="concept-input-value-date-string">algorithm to convert a
@@ -52734,9 +52753,10 @@
string to a <code>Date</code> object</span>, given a string <var
title="">input</var>, is as follows</strong>: If <span title="parse
a time string">parsing a time</span> from <var title="">input</var>
- results in an error, then return an error; otherwise, return a
- <code>Date</code> object representing the parsed <span
- title="concept-time">time</span> in UTC on 1970-01-01.</p>
+ results in an error, then return an error; otherwise, return <span
+ title="create a Date object">a new <code>Date</code> object</span>
+ representing the parsed <span title="concept-time">time</span> in
+ UTC on 1970-01-01.</p>
<p><strong>The <span
title="concept-input-value-date-string">algorithm to convert a
More information about the Commit-Watchers
mailing list