Javascript Dates reference.

Javascript build-in Date object reference.

Create dates:

Prototype Methods:

Syntax: getTime()
Converts date and time in a date object to a single integer that is a millisecond representation of the date object.

Millisecond representation of a date is independent of the time zone.

Return value: The millisecond representation of the adjusted Date object.
An example of using the getTime() :

Constructor (Date) Methods:

Syntax: Date.parse(string)
Parses the date contained in this string and returns it in millisecond format, which can be used directly to create a new Date object or set a date with the setTime() method.
Return value: Milliseconds between the specified date and time and midnight GMT on January 1, 1970.
string: A string containing the date and time to be parsed.
An example of using the parse() :

Prototype Properties:

Syntax: Date.prototype.constructor
This property of the Date.prototype holds the reference back to the Date object.
Important note: This is the same as the constructor property of an instantiated object

Constructor (Date) Properties:

Syntax: Date.constructor
The constructor property is a reference to the function that will be invoked to create a Date object.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.