Bug 147098
Summary: | Date.parse should not accept second values of "60" | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jordan Harband <ljharb> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | darin, fpizlo, mark.lam, ysuzuki |
Priority: | P2 | Keywords: | ES5 |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://ecma-international.org/ecma-262/6.0/#sec-date-time-string-format |
Jordan Harband
`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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Jordan Harband
In latest Safari, both of these return NaN, so it must have been fixed at some point.