Ecmascript 5 Date.parse for ISO 8601 test cases
- by 4esn0k
What results is right for next test cases?
//Chrome Opera Firefox IE 9 Safari
console.log(Date.parse("2012-11-31T23:59:59.000Z"));//1354406399000 NaN NaN 1354406399000 NaN
console.log(Date.parse("2012-12-31T23:59:59.000Z"));//1356998399000 1356998399000 1356998399000 1356998399000 1356998399000
console.log(Date.parse("2012-12-31T23:59:60.000Z"));//NaN NaN NaN NaN 1356998400000
console.log(Date.parse("2012-04-04T05:02:02.170Z"));//1333515722170 1333515722170 1333515722170 1333515722170 1333515722170
console.log(Date.parse("2012-04-04T24:00:00.000Z"));//NaN 1333584000000 1333584000000 1333584000000 1333584000000
console.log(Date.parse("2012-04-04T24:00:00.500Z"));//NaN NaN 1333584000500 1333584000500 NaN