Availability
JavaScript 1.0; JScript 1.0; ECMAScript
v1
Synopsis
Date.parse(date)Arguments
date
A string containing the date and time to be parsed.
Returns
The number of milliseconds between the specified date and time and
midnight GMT on January 1, 1970.
Description
Date.parse( ) is a static method of Date. It is
always invoked through the Date constructor as
Date.parse( ), not through a Date object as
date.parse( ).
Date.parse( ) takes a single string argument. It
parses the date contained in this string and returns it in
millisecond format, which can be used directly, used to create a new
Date object, or used to set the date in an existing Date object with
Date.setTime( ).
The ECMAScript standard does not specify the format of the strings
that can be parsed by Date.parse( ) except to say
that this method can parse the strings returned by the
Date.toString( ) and Date.toUTCString(
) methods. Unfortunately, these functions format dates in
an implementation-dependent way, so it is not in general possible to
write dates in a way that is guaranteed to be understood by all
JavaScript implementations.
See Also
Date, Date.setTime( ), Date.toGMTString( ), Date.UTC( )
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.