rhino1.7.6.testsrc.doctests.date.parse.doctest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rhino Show documentation
Show all versions of rhino Show documentation
Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically
embedded into Java applications to provide scripting to end users.
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
js> Date.parse('1970-01-01T00:00:00.000Z')
0
js> Date.parse('1970-01-01T00:00:00.000A')
NaN
js> Date.parse('1971-02-02T10:10:10.001Z')
34337410001
js> var d = new Date()
js> var _ = d.setMilliseconds(0);
js> Date.parse(d.toISOString()) === d.valueOf();
true
js> Date.parse(d.toISOString()) === Date.parse(d.toString());
true
js> Date.parse(d.toISOString()) === Date.parse(d.toUTCString());
true
js> Date.parse('1970-01-01T00:00:00.000Z a b c')
NaN
js> Date.parse('1970-01-01T00:00:00.000A')
NaN
© 2015 - 2024 Weber Informatics LLC | Privacy Policy