Date toString methods follow the date format used by other JS engines:
new Date(0).toString () == "Thu Jan 01 1970 00:00:00 GMT+0000" new Date(0).toUTCString () == "Thu, 01 Jan 1970 00:00:00 GMT" new Date(0).toISOString () == "1970-01-01T00:00:00.000Z" Fixes S15.5.4.7_A1_T11.js test case. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
This commit is contained in:
@@ -74,5 +74,6 @@ catch (e)
|
||||
assert (typeof Date (2015) == "string");
|
||||
assert (typeof Date() != typeof (new Date ()));
|
||||
assert (Date (Number.NaN) == Date ());
|
||||
|
||||
// Fixme: remove this case when Date() gives the current time.
|
||||
assert (Date (2015,1,2) == "1970-01-01T00:00:00.000");
|
||||
assert (Date (2015,1,2) == "Thu Jan 01 1970 00:00:00 GMT+0000");
|
||||
|
||||
Reference in New Issue
Block a user