| 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 |
The [[Class]] property of the newly constructed object |
| 7 |
is set to "Date" |
| 8 |
esid: sec-date-year-month-date-hours-minutes-seconds-ms |
| 9 |
description: 6 arguments, (year, month, date, hours, minutes, seconds) |
| 10 |
---*/ |
| 11 |
|
| 12 |
var x1 = new Date(1899, 11, 31, 23, 59, 59); |
| 13 |
|
| 14 |
assert.sameValue( |
| 15 |
Object.prototype.toString.call(x1), |
| 16 |
"[object Date]", |
| 17 |
'Object.prototype.toString.call(new Date(1899, 11, 31, 23, 59, 59)) must return "[object Date]"' |
| 18 |
); |
| 19 |
|
| 20 |
var x2 = new Date(1899, 12, 1, 0, 0, 0); |
| 21 |
|
| 22 |
assert.sameValue( |
| 23 |
Object.prototype.toString.call(x2), |
| 24 |
"[object Date]", |
| 25 |
'Object.prototype.toString.call(new Date(1899, 12, 1, 0, 0, 0)) must return "[object Date]"' |
| 26 |
); |
| 27 |
|
| 28 |
var x3 = new Date(1900, 0, 1, 0, 0, 0); |
| 29 |
|
| 30 |
assert.sameValue( |
| 31 |
Object.prototype.toString.call(x3), |
| 32 |
"[object Date]", |
| 33 |
'Object.prototype.toString.call(new Date(1900, 0, 1, 0, 0, 0)) must return "[object Date]"' |
| 34 |
); |
| 35 |
|
| 36 |
var x4 = new Date(1969, 11, 31, 23, 59, 59); |
| 37 |
|
| 38 |
assert.sameValue( |
| 39 |
Object.prototype.toString.call(x4), |
| 40 |
"[object Date]", |
| 41 |
'Object.prototype.toString.call(new Date(1969, 11, 31, 23, 59, 59)) must return "[object Date]"' |
| 42 |
); |
| 43 |
|
| 44 |
var x5 = new Date(1969, 12, 1, 0, 0, 0); |
| 45 |
|
| 46 |
assert.sameValue( |
| 47 |
Object.prototype.toString.call(x5), |
| 48 |
"[object Date]", |
| 49 |
'Object.prototype.toString.call(new Date(1969, 12, 1, 0, 0, 0)) must return "[object Date]"' |
| 50 |
); |
| 51 |
|
| 52 |
var x6 = new Date(1970, 0, 1, 0, 0, 0); |
| 53 |
|
| 54 |
assert.sameValue( |
| 55 |
Object.prototype.toString.call(x6), |
| 56 |
"[object Date]", |
| 57 |
'Object.prototype.toString.call(new Date(1970, 0, 1, 0, 0, 0)) must return "[object Date]"' |
| 58 |
); |
| 59 |
|
| 60 |
var x7 = new Date(1999, 11, 31, 23, 59, 59); |
| 61 |
|
| 62 |
assert.sameValue( |
| 63 |
Object.prototype.toString.call(x7), |
| 64 |
"[object Date]", |
| 65 |
'Object.prototype.toString.call(new Date(1999, 11, 31, 23, 59, 59)) must return "[object Date]"' |
| 66 |
); |
| 67 |
|
| 68 |
var x8 = new Date(1999, 12, 1, 0, 0, 0); |
| 69 |
|
| 70 |
assert.sameValue( |
| 71 |
Object.prototype.toString.call(x8), |
| 72 |
"[object Date]", |
| 73 |
'Object.prototype.toString.call(new Date(1999, 12, 1, 0, 0, 0)) must return "[object Date]"' |
| 74 |
); |
| 75 |
|
| 76 |
var x9 = new Date(2000, 0, 1, 0, 0, 0); |
| 77 |
|
| 78 |
assert.sameValue( |
| 79 |
Object.prototype.toString.call(x9), |
| 80 |
"[object Date]", |
| 81 |
'Object.prototype.toString.call(new Date(2000, 0, 1, 0, 0, 0)) must return "[object Date]"' |
| 82 |
); |
| 83 |
|
| 84 |
var x10 = new Date(2099, 11, 31, 23, 59, 59); |
| 85 |
|
| 86 |
assert.sameValue( |
| 87 |
Object.prototype.toString.call(x10), |
| 88 |
"[object Date]", |
| 89 |
'Object.prototype.toString.call(new Date(2099, 11, 31, 23, 59, 59)) must return "[object Date]"' |
| 90 |
); |
| 91 |
|
| 92 |
var x11 = new Date(2099, 12, 1, 0, 0, 0); |
| 93 |
|
| 94 |
assert.sameValue( |
| 95 |
Object.prototype.toString.call(x11), |
| 96 |
"[object Date]", |
| 97 |
'Object.prototype.toString.call(new Date(2099, 12, 1, 0, 0, 0)) must return "[object Date]"' |
| 98 |
); |
| 99 |
|
| 100 |
var x12 = new Date(2100, 0, 1, 0, 0, 0); |
| 101 |
|
| 102 |
assert.sameValue( |
| 103 |
Object.prototype.toString.call(x12), |
| 104 |
"[object Date]", |
| 105 |
'Object.prototype.toString.call(new Date(2100, 0, 1, 0, 0, 0)) must return "[object Date]"' |
| 106 |
); |
| 107 |
|
| 108 |
reportCompare(0, 0); |