Bug 147098 - Date.parse should not accept second values of "60"
Summary: Date.parse should not accept second values of "60"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://ecma-international.org/ecma-26...
Keywords: ES5
Depends on:
Blocks:
 
Reported: 2015-07-19 15:33 PDT by Jordan Harband
Modified: 2022-04-02 15:10 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Harband 2015-07-19 15:33:35 PDT
`Date.parse('2012-12-31T23:59:60.000Z')` should return NaN, and instead returns `Date.parse('2013-01-01T00:00:00.000Z')`
`Date.parse('2015-06-30T23:59:60.000Z')` should return NaN, and instead returns `Date.parse('2015-07-01T00:00:00.000Z')`

Note that the second example is an actual leap second, and it doesn't even work properly.

The spec requires that only seconds from 0 to 59 are supported.
Comment 1 Jordan Harband 2022-04-02 15:10:15 PDT
In latest Safari, both of these return NaN, so it must have been fixed at some point.