ISSUE-52 - Public View

DOM3EV: DOMTimeStamp - Number or Date in ES?

State:
CLOSED
Product:
DOM 3 Events
Raised by:
Bjoern Hoehrmann
Opened on:
2006-03-27
Description:
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.

Note: Some of these links may be accessible only to W3C Members.

Related emails:
  1. ISSUE-52: DOM3EV: DOMTimeStamp - Number or Date in ES? (from dean+cgi@w3.org on 2006-03-27)
  2. timeStamp and DOMTimeStamp (from ian@hixie.ch on 2006-03-27)
  3. Minutes 2006-03-27 (from chaals@opera.com on 2006-04-09)
  4. Minutes - 3 April (from chaals@opera.com on 2006-05-15)

Related notes:

No additional notes.