I'm wondering if someone can point me to any past rationale for the decision to support Date objects in an "Invalid Date" state instead of throwing an exception whenever the user attempts to form an invalid date?
Tracking down the source of script errors is difficult if something like "new Date(undefined)" is done, followed by a ".getTime()", propagating a NaN down layers of abstraction. Additional strange cases involve using NaN, Infinity, etc throughout the Date API. I was curious if there is a good reason for this or if potentially undefined / non-finite numbers could throw in a strict-mode setting. I didn't notice this behavior in the spec, but all browsers appear to follow the same convention. -Andrew _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

