Date.parse() : parse « Date « JavaScript Tutorial






Syntax

Date.parse(date)

The parse() method returns the time, represented in milliseconds between date argument string and midnight, January 1, 1970, GMT.

This method is associated with the "Date" object rather than a date instance.

The string date should use the format written by the Date toGMTString() method, which looks like the following:

Mon, 24 Oct 1982 12:03:27 -0200

The method will also accept strings that lack all or portions of the time and time zone.

<html>
    <script language="JavaScript">
    <!--
    //Display a date in milliseconds
    document.write("<br>The milliseconds of the string: ");
    document.write(Date.parse("Sun, 24 Oct 1982 12:03:27"));
    -->
    </script>
    </html>








12.24.parse
12.24.1.Date.parse()
12.24.2.Parse Date by using the Date.parse(dateVariable)