| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
esid: sec-date-time-string-format |
| 6 |
es5id: 15.9.1.15-1 |
| 7 |
description: > |
| 8 |
Date Time String Format - specified default values will be set for |
| 9 |
all optional fields(MM, DD, mm, ss and time zone) when they are |
| 10 |
absent |
| 11 |
---*/ |
| 12 |
|
| 13 |
var result = false; |
| 14 |
var expectedDateTimeStr = "1970-01-01T00:00:00.000Z"; |
| 15 |
var dateObj = new Date("1970"); |
| 16 |
var dateStr = dateObj.toISOString(); |
| 17 |
result = dateStr === expectedDateTimeStr; |
| 18 |
|
| 19 |
assert(result, 'result !== true'); |