2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
When Date is called as part of a new expression it is
|
|
|
|
a constructor: it initializes the newly created object
|
2017-07-27 23:24:39 +02:00
|
|
|
esid: sec-date-year-month-date-hours-minutes-seconds-ms
|
2014-07-22 01:09:02 +02:00
|
|
|
description: 4 arguments, (year, month, date, hours)
|
|
|
|
---*/
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1899, 11, 31, 23),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1899, 11, 31, 23)` is expected to be "object"'
|
|
|
|
);
|
|
|
|
|
|
|
|
assert.notSameValue(
|
|
|
|
new Date(1899, 11, 31, 23),
|
|
|
|
undefined,
|
|
|
|
'new Date(1899, 11, 31, 23) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x13 = new Date(1899, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x13, "object", 'The value of `typeof x13` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x14 = new Date(1899, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x14, undefined, 'The value of x14 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1899, 12, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1899, 12, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(1899, 12, 1, 0),
|
|
|
|
undefined,
|
|
|
|
'new Date(1899, 12, 1, 0) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x23 = new Date(1899, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x23, "object", 'The value of `typeof x23` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x24 = new Date(1899, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x24, undefined, 'The value of x24 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1900, 0, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1900, 0, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(new Date(1900, 0, 1, 0), undefined, 'new Date(1900, 0, 1, 0) is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x33 = new Date(1900, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x33, "object", 'The value of `typeof x33` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x34 = new Date(1900, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x34, undefined, 'The value of x34 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1969, 11, 31, 23),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1969, 11, 31, 23)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(1969, 11, 31, 23),
|
|
|
|
undefined,
|
|
|
|
'new Date(1969, 11, 31, 23) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x43 = new Date(1969, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x43, "object", 'The value of `typeof x43` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x44 = new Date(1969, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x44, undefined, 'The value of x44 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1969, 12, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1969, 12, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(1969, 12, 1, 0),
|
|
|
|
undefined,
|
|
|
|
'new Date(1969, 12, 1, 0) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x53 = new Date(1969, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x53, "object", 'The value of `typeof x53` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x54 = new Date(1969, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x54, undefined, 'The value of x54 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1970, 0, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1970, 0, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(new Date(1970, 0, 1, 0), undefined, 'new Date(1970, 0, 1, 0) is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x63 = new Date(1970, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x63, "object", 'The value of `typeof x63` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x64 = new Date(1970, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x64, undefined, 'The value of x64 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1999, 11, 31, 23),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1999, 11, 31, 23)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(1999, 11, 31, 23),
|
|
|
|
undefined,
|
|
|
|
'new Date(1999, 11, 31, 23) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x73 = new Date(1999, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x73, "object", 'The value of `typeof x73` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x74 = new Date(1999, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x74, undefined, 'The value of x74 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(1999, 12, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(1999, 12, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(1999, 12, 1, 0),
|
|
|
|
undefined,
|
|
|
|
'new Date(1999, 12, 1, 0) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x83 = new Date(1999, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x83, "object", 'The value of `typeof x83` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x84 = new Date(1999, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x84, undefined, 'The value of x84 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(2000, 0, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(2000, 0, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(new Date(2000, 0, 1, 0), undefined, 'new Date(2000, 0, 1, 0) is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x93 = new Date(2000, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x93, "object", 'The value of `typeof x93` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x94 = new Date(2000, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x94, undefined, 'The value of x94 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(2099, 11, 31, 23),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(2099, 11, 31, 23)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(2099, 11, 31, 23),
|
|
|
|
undefined,
|
|
|
|
'new Date(2099, 11, 31, 23) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x103 = new Date(2099, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x103, "object", 'The value of `typeof x103` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x104 = new Date(2099, 11, 31, 23);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x104, undefined, 'The value of x104 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(2099, 12, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(2099, 12, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(
|
|
|
|
new Date(2099, 12, 1, 0),
|
|
|
|
undefined,
|
|
|
|
'new Date(2099, 12, 1, 0) is expected to not equal ``undefined``'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x113 = new Date(2099, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x113, "object", 'The value of `typeof x113` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x114 = new Date(2099, 12, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x114, undefined, 'The value of x114 is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(
|
|
|
|
typeof new Date(2100, 0, 1, 0),
|
|
|
|
"object",
|
|
|
|
'The value of `typeof new Date(2100, 0, 1, 0)` is expected to be "object"'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(new Date(2100, 0, 1, 0), undefined, 'new Date(2100, 0, 1, 0) is expected to not equal ``undefined``');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x123 = new Date(2100, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.sameValue(typeof x123, "object", 'The value of `typeof x123` is expected to be "object"');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
var x124 = new Date(2100, 0, 1, 0);
|
2021-08-11 20:13:41 +02:00
|
|
|
assert.notSameValue(x124, undefined, 'The value of x124 is expected to not equal ``undefined``');
|