| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: | |
| 6 |
When Date is called as part of a new expression it is |
| 7 |
a constructor: it initializes the newly created object |
| 8 |
esid: sec-date-year-month-date-hours-minutes-seconds-ms |
| 9 |
description: 6 arguments, (year, month, date, hours, minutes, seconds) |
| 10 |
---*/ |
| 11 |
assert.sameValue( |
| 12 |
typeof new Date(1899, 11, 31, 23, 59, 59), |
| 13 |
"object", |
| 14 |
'The value of `typeof new Date(1899, 11, 31, 23, 59, 59)` is expected to be "object"' |
| 15 |
); |
| 16 |
|
| 17 |
assert.notSameValue( |
| 18 |
new Date(1899, 11, 31, 23, 59, 59), |
| 19 |
undefined, |
| 20 |
'new Date(1899, 11, 31, 23, 59, 59) is expected to not equal ``undefined``' |
| 21 |
); |
| 22 |
|
| 23 |
var x13 = new Date(1899, 11, 31, 23, 59, 59); |
| 24 |
assert.sameValue(typeof x13, "object", 'The value of `typeof x13` is expected to be "object"'); |
| 25 |
|
| 26 |
var x14 = new Date(1899, 11, 31, 23, 59, 59); |
| 27 |
assert.notSameValue(x14, undefined, 'The value of x14 is expected to not equal ``undefined``'); |
| 28 |
|
| 29 |
assert.sameValue( |
| 30 |
typeof new Date(1899, 12, 1, 0, 0, 0), |
| 31 |
"object", |
| 32 |
'The value of `typeof new Date(1899, 12, 1, 0, 0, 0)` is expected to be "object"' |
| 33 |
); |
| 34 |
|
| 35 |
assert.notSameValue( |
| 36 |
new Date(1899, 12, 1, 0, 0, 0), |
| 37 |
undefined, |
| 38 |
'new Date(1899, 12, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 39 |
); |
| 40 |
|
| 41 |
var x23 = new Date(1899, 12, 1, 0, 0, 0); |
| 42 |
assert.sameValue(typeof x23, "object", 'The value of `typeof x23` is expected to be "object"'); |
| 43 |
|
| 44 |
var x24 = new Date(1899, 12, 1, 0, 0, 0); |
| 45 |
assert.notSameValue(x24, undefined, 'The value of x24 is expected to not equal ``undefined``'); |
| 46 |
|
| 47 |
assert.sameValue( |
| 48 |
typeof new Date(1900, 0, 1, 0, 0, 0), |
| 49 |
"object", |
| 50 |
'The value of `typeof new Date(1900, 0, 1, 0, 0, 0)` is expected to be "object"' |
| 51 |
); |
| 52 |
|
| 53 |
assert.notSameValue( |
| 54 |
new Date(1900, 0, 1, 0, 0, 0), |
| 55 |
undefined, |
| 56 |
'new Date(1900, 0, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 57 |
); |
| 58 |
|
| 59 |
var x33 = new Date(1900, 0, 1, 0, 0, 0); |
| 60 |
assert.sameValue(typeof x33, "object", 'The value of `typeof x33` is expected to be "object"'); |
| 61 |
|
| 62 |
var x34 = new Date(1900, 0, 1, 0, 0, 0); |
| 63 |
assert.notSameValue(x34, undefined, 'The value of x34 is expected to not equal ``undefined``'); |
| 64 |
|
| 65 |
assert.sameValue( |
| 66 |
typeof new Date(1969, 11, 31, 23, 59, 59), |
| 67 |
"object", |
| 68 |
'The value of `typeof new Date(1969, 11, 31, 23, 59, 59)` is expected to be "object"' |
| 69 |
); |
| 70 |
|
| 71 |
assert.notSameValue( |
| 72 |
new Date(1969, 11, 31, 23, 59, 59), |
| 73 |
undefined, |
| 74 |
'new Date(1969, 11, 31, 23, 59, 59) is expected to not equal ``undefined``' |
| 75 |
); |
| 76 |
|
| 77 |
var x43 = new Date(1969, 11, 31, 23, 59, 59); |
| 78 |
assert.sameValue(typeof x43, "object", 'The value of `typeof x43` is expected to be "object"'); |
| 79 |
|
| 80 |
var x44 = new Date(1969, 11, 31, 23, 59, 59); |
| 81 |
assert.notSameValue(x44, undefined, 'The value of x44 is expected to not equal ``undefined``'); |
| 82 |
|
| 83 |
assert.sameValue( |
| 84 |
typeof new Date(1969, 12, 1, 0, 0, 0), |
| 85 |
"object", |
| 86 |
'The value of `typeof new Date(1969, 12, 1, 0, 0, 0)` is expected to be "object"' |
| 87 |
); |
| 88 |
|
| 89 |
assert.notSameValue( |
| 90 |
new Date(1969, 12, 1, 0, 0, 0), |
| 91 |
undefined, |
| 92 |
'new Date(1969, 12, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 93 |
); |
| 94 |
|
| 95 |
var x53 = new Date(1969, 12, 1, 0, 0, 0); |
| 96 |
assert.sameValue(typeof x53, "object", 'The value of `typeof x53` is expected to be "object"'); |
| 97 |
|
| 98 |
var x54 = new Date(1969, 12, 1, 0, 0, 0); |
| 99 |
assert.notSameValue(x54, undefined, 'The value of x54 is expected to not equal ``undefined``'); |
| 100 |
|
| 101 |
assert.sameValue( |
| 102 |
typeof new Date(1970, 0, 1, 0, 0, 0), |
| 103 |
"object", |
| 104 |
'The value of `typeof new Date(1970, 0, 1, 0, 0, 0)` is expected to be "object"' |
| 105 |
); |
| 106 |
|
| 107 |
assert.notSameValue( |
| 108 |
new Date(1970, 0, 1, 0, 0, 0), |
| 109 |
undefined, |
| 110 |
'new Date(1970, 0, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 111 |
); |
| 112 |
|
| 113 |
var x63 = new Date(1970, 0, 1, 0, 0, 0); |
| 114 |
assert.sameValue(typeof x63, "object", 'The value of `typeof x63` is expected to be "object"'); |
| 115 |
|
| 116 |
var x64 = new Date(1970, 0, 1, 0, 0, 0); |
| 117 |
assert.notSameValue(x64, undefined, 'The value of x64 is expected to not equal ``undefined``'); |
| 118 |
|
| 119 |
assert.sameValue( |
| 120 |
typeof new Date(1999, 11, 31, 23, 59, 59), |
| 121 |
"object", |
| 122 |
'The value of `typeof new Date(1999, 11, 31, 23, 59, 59)` is expected to be "object"' |
| 123 |
); |
| 124 |
|
| 125 |
assert.notSameValue( |
| 126 |
new Date(1999, 11, 31, 23, 59, 59), |
| 127 |
undefined, |
| 128 |
'new Date(1999, 11, 31, 23, 59, 59) is expected to not equal ``undefined``' |
| 129 |
); |
| 130 |
|
| 131 |
var x73 = new Date(1999, 11, 31, 23, 59, 59); |
| 132 |
assert.sameValue(typeof x73, "object", 'The value of `typeof x73` is expected to be "object"'); |
| 133 |
|
| 134 |
var x74 = new Date(1999, 11, 31, 23, 59, 59); |
| 135 |
assert.notSameValue(x74, undefined, 'The value of x74 is expected to not equal ``undefined``'); |
| 136 |
|
| 137 |
assert.sameValue( |
| 138 |
typeof new Date(1999, 12, 1, 0, 0, 0), |
| 139 |
"object", |
| 140 |
'The value of `typeof new Date(1999, 12, 1, 0, 0, 0)` is expected to be "object"' |
| 141 |
); |
| 142 |
|
| 143 |
assert.notSameValue( |
| 144 |
new Date(1999, 12, 1, 0, 0, 0), |
| 145 |
undefined, |
| 146 |
'new Date(1999, 12, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 147 |
); |
| 148 |
|
| 149 |
var x83 = new Date(1999, 12, 1, 0, 0, 0); |
| 150 |
assert.sameValue(typeof x83, "object", 'The value of `typeof x83` is expected to be "object"'); |
| 151 |
|
| 152 |
var x84 = new Date(1999, 12, 1, 0, 0, 0); |
| 153 |
assert.notSameValue(x84, undefined, 'The value of x84 is expected to not equal ``undefined``'); |
| 154 |
|
| 155 |
assert.sameValue( |
| 156 |
typeof new Date(2000, 0, 1, 0, 0, 0), |
| 157 |
"object", |
| 158 |
'The value of `typeof new Date(2000, 0, 1, 0, 0, 0)` is expected to be "object"' |
| 159 |
); |
| 160 |
|
| 161 |
assert.notSameValue( |
| 162 |
new Date(2000, 0, 1, 0, 0, 0), |
| 163 |
undefined, |
| 164 |
'new Date(2000, 0, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 165 |
); |
| 166 |
|
| 167 |
var x93 = new Date(2000, 0, 1, 0, 0, 0); |
| 168 |
assert.sameValue(typeof x93, "object", 'The value of `typeof x93` is expected to be "object"'); |
| 169 |
|
| 170 |
var x94 = new Date(2000, 0, 1, 0, 0, 0); |
| 171 |
assert.notSameValue(x94, undefined, 'The value of x94 is expected to not equal ``undefined``'); |
| 172 |
|
| 173 |
assert.sameValue( |
| 174 |
typeof new Date(2099, 11, 31, 23, 59, 59), |
| 175 |
"object", |
| 176 |
'The value of `typeof new Date(2099, 11, 31, 23, 59, 59)` is expected to be "object"' |
| 177 |
); |
| 178 |
|
| 179 |
assert.notSameValue( |
| 180 |
new Date(2099, 11, 31, 23, 59, 59), |
| 181 |
undefined, |
| 182 |
'new Date(2099, 11, 31, 23, 59, 59) is expected to not equal ``undefined``' |
| 183 |
); |
| 184 |
|
| 185 |
var x103 = new Date(2099, 11, 31, 23, 59, 59); |
| 186 |
assert.sameValue(typeof x103, "object", 'The value of `typeof x103` is expected to be "object"'); |
| 187 |
|
| 188 |
var x104 = new Date(2099, 11, 31, 23, 59, 59); |
| 189 |
assert.notSameValue(x104, undefined, 'The value of x104 is expected to not equal ``undefined``'); |
| 190 |
|
| 191 |
assert.sameValue( |
| 192 |
typeof new Date(2099, 12, 1, 0, 0, 0), |
| 193 |
"object", |
| 194 |
'The value of `typeof new Date(2099, 12, 1, 0, 0, 0)` is expected to be "object"' |
| 195 |
); |
| 196 |
|
| 197 |
assert.notSameValue( |
| 198 |
new Date(2099, 12, 1, 0, 0, 0), |
| 199 |
undefined, |
| 200 |
'new Date(2099, 12, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 201 |
); |
| 202 |
|
| 203 |
var x113 = new Date(2099, 12, 1, 0, 0, 0); |
| 204 |
assert.sameValue(typeof x113, "object", 'The value of `typeof x113` is expected to be "object"'); |
| 205 |
|
| 206 |
var x114 = new Date(2099, 12, 1, 0, 0, 0); |
| 207 |
assert.notSameValue(x114, undefined, 'The value of x114 is expected to not equal ``undefined``'); |
| 208 |
|
| 209 |
assert.sameValue( |
| 210 |
typeof new Date(2100, 0, 1, 0, 0, 0), |
| 211 |
"object", |
| 212 |
'The value of `typeof new Date(2100, 0, 1, 0, 0, 0)` is expected to be "object"' |
| 213 |
); |
| 214 |
|
| 215 |
assert.notSameValue( |
| 216 |
new Date(2100, 0, 1, 0, 0, 0), |
| 217 |
undefined, |
| 218 |
'new Date(2100, 0, 1, 0, 0, 0) is expected to not equal ``undefined``' |
| 219 |
); |
| 220 |
|
| 221 |
var x123 = new Date(2100, 0, 1, 0, 0, 0); |
| 222 |
assert.sameValue(typeof x123, "object", 'The value of `typeof x123` is expected to be "object"'); |
| 223 |
|
| 224 |
var x124 = new Date(2100, 0, 1, 0, 0, 0); |
| 225 |
assert.notSameValue(x124, undefined, 'The value of x124 is expected to not equal ``undefined``'); |
| 226 |
|
| 227 |
reportCompare(0, 0); |