getDate Method
Returns the day-of-the-month value in a Date object using local time.
function getDate() : Number
Remarks
To get the date value using Coordinated Universal Time (UTC), use the getUTCDate method.
The return value is an integer between 1 and 31 that represents the day-of-the-month value in the Date object.
Example
The following example illustrates the use of the getDate method.
function DateDemo(){
var s = "Today's date is: ";
var d = new Date();
s += (d.getMonth() + 1) + "/";
s += d.getDate() + "/";
s += d.getFullYear();
return(s);
}
Requirements
Applies To:
See Also
Reference
Change History
Date |
History |
Reason |
---|---|---|
March 2009 |
Replaced obsolete method in sample code. |
Content bug fix. |