Date.parse accepts "-000000" year in extended ISO-8601 format

NEW
Unassigned

Status

()

Core
JavaScript: Standard Library
6 years ago
2 years ago

People

(Reporter: anba, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
Build ID: 20121010144125

Steps to reproduce:

js> Date.parse("-000000-01-01T00:00:00.000Z") 



Actual results:

Date.parse() returns the number `-62167219200000`


Expected results:

Date.parse() should return `NaN`, cf. ES5.1 [15.9.1.15.1  Extended years]:
---
[...] The year 0  is considered positive and hence prefixed with a + sign.
---
(Reporter)

Updated

6 years ago
OS: Windows 7 → All
Hardware: x86_64 → All
(Assignee)

Updated

4 years ago
Assignee: general → nobody
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → JavaScript: Standard Library
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.