| 1 |
// This Source Code Form is subject to the terms of the Mozilla Public |
| 2 |
// License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 |
// file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 4 |
|
| 5 |
js> Date.parse('1970-01-01T00:00:00.000Z') |
| 6 |
0 |
| 7 |
js> Date.parse('1970-01-01T00:00:00.000A') |
| 8 |
NaN |
| 9 |
js> Date.parse('1971-02-02T10:10:10.001Z') |
| 10 |
34337410001 |
| 11 |
js> var d = new Date() |
| 12 |
js> var _ = d.setMilliseconds(0); |
| 13 |
js> Date.parse(d.toISOString()) === d.valueOf(); |
| 14 |
true |
| 15 |
js> Date.parse(d.toISOString()) === Date.parse(d.toString()); |
| 16 |
true |
| 17 |
js> Date.parse(d.toISOString()) === Date.parse(d.toUTCString()); |
| 18 |
true |
| 19 |
js> Date.parse('1970-01-01T00:00:00.000Z a b c') |
| 20 |
NaN |
| 21 |
js> Date.parse('1970-01-01T00:00:00.000A') |
| 22 |
NaN |