This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16539 - The undefined date type
Summary: The undefined date type
Status: RESOLVED INVALID
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 16:50 UTC by Marcos Caceres
Modified: 2012-03-30 18:55 UTC (History)
2 users (show)

See Also:


Attachments

Description Marcos Caceres 2012-03-27 16:50:56 UTC
in 4.2.26. Date, it sez: 

"If the time value of V is NaN, then return the undefined IDL Date value."

Does that mean "return undefined"? or "return new Date(undefined)"? or something else? 

It's not really clear to me how the following is represented:

"An additional value that this type can represent is one that indicates an indeterminate or undefined time, which we write as undefined."
Comment 1 Cameron McCormack 2012-03-27 23:07:29 UTC
This is the algorithm from converting from a JS value to an IDL value of type Date.  It doesn't mean "return undefined" or "return new Date(undefined)" -- it doesn't really make sense to think about returning JS values here.

The IDL Date type has values that correspond to all of the possibly time values that JS Date objects can represent, including the time value that does not represent a specific point in time (which in a JS Date object is one that could be created by for example evaluating `new Date("")`).  In space of IDL Date type values, I just call that value "undefined".