Date.parse return type

Brendan Eich brendan at mozilla.org
Sat Jul 28 11:13:24 PDT 2007


Same as ever (backward compatibility): NaN.

/be

On Jul 28, 2007, at 8:19 AM, doekman at gmail.com wrote:

> 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
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss




More information about the Es4-discuss mailing list