W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

ISSUE-52: DOM3EV: DOMTimeStamp - Number or Date in ES?

From: Web APIs Issue Tracker <dean+cgi@w3.org>
Date: Mon, 27 Mar 2006 04:20:03 +0000 (GMT)
To: public-webapi@w3.org
Message-Id: <20060327042003.64C4647B93@mojo.w3.org>

ISSUE-52: DOM3EV: DOMTimeStamp - Number or Date in ES?


Raised by: Bjoern Hoehrmann
On product: DOM 3 Events

DOM Level 3 Events currently defines, just like DOM Level 2 Events,
that Event.timeStamp maps to Date in ECMAScript; DOM Level 3 Core
justifies this by claiming the 'integer' type is not big enough. It
seems there is no 'integer' in ECMAScript and 'Number' is a little
bit bigger than Date.

DOM Level 3 Events also notes "When not available, a value of 0
will be returned. Examples of epoch time are the time of the system
start or 0:0:0 UTC 1st January 1970." A Date, however, cannot be
0 so easily, that should probably refer to a Date with NaN as the
underlying value as defined in ECMA-262.

Implementations interoperably ignore this, Opera, Mozilla, Safari,
and Batik all return a Number, not a Date. It seems we should make
DOMTimeStamp a Number. It seems the only other user of DOMTimeStamp
is http://www.w3.org/Submission/web-forms2/ where Date does seem
desired, but it seems it can be easily fixed to use some other type.
Received on Monday, 27 March 2006 04:20:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC