What methods are available with the date() function?

Get (or set) individual date and time fields.

Entries above containing UTC are Coordinated Universal Time (UTC) while those without are local time. Also available corresponding to all of the above are set functions to change the date and time.

Other Useful Date Methods.
Using the Date Methods.

To use the date methods, you first declare a variable to be a new Date and then reference the date methods with respect to the date so declared. For example:

 var now = new Date;
var hourOfDay = now.getHour();


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow