Date.parse return type

doekman at gmail.com doekman at gmail.com
Sat Jul 28 08:19:14 PDT 2007


On 7/23/07, Brendan Eich <brendan at mozilla.org> wrote:
> On Jul 23, 2007, at 10:23 AM, doekman at gmail.com wrote:
> > In the public Date/time proposal, the Date.parse static method
> > returns a Date. This is a bit odd, because the current javascript
> > Date.parse method returns a number (nr. of ms since epoch). Is this
> > by design?
>
> That's a mistake, which Lars noticed and corrected recently.

OK, that's clear. But does Date.parse("2007-07-28") raise a
SyntaxError, or does it return NaN?
-- 
|\
| \
|_/oeke
doekman at gmail.com



More information about the Es4-discuss mailing list