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:
Zoltan Herczeg
2015-08-13 03:54:49 -07:00
parent 4ee30cba5d
commit 5be41b44bb
6 changed files with 237 additions and 31 deletions
+2 -1
View File
@@ -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");