Leap seconds for Date.parse

Douglas Crockford douglas at crockford.com
Tue Jul 20 11:13:28 PDT 2010


On 7/20/2010 10:44 AM, Allen Wirfs-Brock wrote:
>
> The ES5 “ISO” date format is explicitly billed as a /simplification/ 
> of the ISO 8601 Extended Format. The lack of leap seconds is just one 
> of the simplifications. Because it is not the exact ISO 8601 format 
> you can’t reliably expect Date.parse to currently deal with strings 
> generated in conformance to the 8601 format. It seems to me that 
> trying to define handling for a ss value of 60 is just the first step 
> on the slippery slope of supporting the full ISO 8601 format. Why stop 
> at leap seconds?
>
> In the errata we are just trying to correct errors in the 
> specification, not add new functionality. Failure to explicitly state 
> the allowed range of ss is arguably an error and the obvious 
> correction is to specify it as 00.59. We can argument about whether 
> that was the original intent but not supporting leap seconds seems 
> like exactly the sort of simplification that motivated this format 
> rather than simply saying the format was the exact ISO 8601 format.
>
>

I think the leap second is the stupidest invention of all Time. But I 
think it would be a kind thing to treat :60 as :59.


More information about the es5-discuss mailing list