| parse() The parse() method is used to return the time, measured in milliseconds from the date given as date (see syntax) to the present date. The present date is taken from the client operating system. The ful date specified must be in the following form: DayOfWeek, dayOfMonth MM YYYY HH:MM:SS TimeZoneOffset The above is the format followed by the toGMTString() method. syntax: Date.parse(date) EXAMPLE document.write("The number of milliseconds from January 1st, 1970 to Sun, Jan 3 1999 10:15:30 is : " + Date.parse('Sun, Jan 3 1999 10:15:30') ); The document.write statement is used to show the number of milliseconds since Sun, Jan 3 1999 10:15:30 from January 1st, 1970. The output should look like the following: The number of milliseconds from January 1st, 1970 to Sun, Jan 3 1999 10:15:30 is : 915387330000 |