Add implementation specific date parsing (#4576)
It is compatible with Firefox and Chrome. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -40,7 +40,7 @@ var wrongFormats = ["",
|
||||
"2015-01-01T24:00:01.000",
|
||||
"2015-01-01T24:00:00.001",
|
||||
"2015-01-01T00:00+01:00Z",
|
||||
"2015/01/01",
|
||||
"2015/01-01",
|
||||
"2015-01-32",
|
||||
"2015--1",
|
||||
"2015-13",
|
||||
@@ -176,3 +176,7 @@ assert (Date.parse("Fri, 31 Dec 9999 23:59:59 GMT") == 253402300799000)
|
||||
assert (Date.parse("Sat, 01 Jan 10000 00:00:00 GMT") == 253402300800000)
|
||||
assert (Date.parse("Sat, 13 Sep 275760 00:00:00 GMT") == 8640000000000000)
|
||||
assert (isNaN(Date.parse("Sat, 13 Sep 275760 00:00:01 GMT"))) // 8640000000001000 - out of range
|
||||
|
||||
// Non standard date formats
|
||||
assert (Date.parse("2000/01/01 12:12Z") == 946728720000)
|
||||
assert (Date.parse("1991-07-13 16:04Z") == 679421040000)
|
||||
|
||||
Reference in New Issue
Block a user