puppeteer/third_party/phantomjs/test/standards/javascript/date.js
2017-05-11 00:06:41 -07:00

13 lines
375 B
JavaScript

test(function() {
var date = new Date('2012-09-07');
assert_not_equals(date.toString(), 'Invalid Date');
assert_equals(date.getUTCDate(), 7);
assert_equals(date.getUTCMonth(), 8);
assert_equals(date.getYear(), 112);
}, "new Date()");
test(function () {
var date = Date.parse("2012-01-01");
assert_equals(date, 1325376000000);
}, "Date.parse()");