Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











METHOD:  Date::parse


Date.parse(dateString)

This method takes a date string an returns the number of milliseconds since January 01 1970 00:00:00, according to local time. It accepts the standard date syntax, e.g. "Friday, 9 July, 11:10:00 GMT+0130". If a time zone is not specified, this method assumes that the supplied string is local time.

This is a static method of Date and, subsequently, the syntax is always Date.parse() as opposed to objectName.parse().

The following code uses the Date.parse method to set the value of the myDate object to that of the supplied string.

Code:
myDate = new Date()
myDate.setTime(Date.parse("July 3, 1999"))
document.write(myDate)

Output:
Sat Jul 3 00:00:00 UTC+0100 1999

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information