Language Reference parse Method


Description

Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.

Syntax

var intDateMilli = Date.parse( datestring )

Return Value

An integer value representing the number of milliseconds between midnight, January 1, 1970 and the supplied date.

Arguments

The parse method has one argument.

datestring
A string containing a date in a format such as "Jan 5, 1996 08:47:00"

Remarks
The parse method is a static method of the Date object, and should always be used as Date.parse( datestring ) instead of being invoked as a normal method of some created Date object.