JavaScript Date getUTCDate() Method
- Previous Page getTimezoneOffset()
- Next Page getUTCDay()
- Go Back to the Previous Level JavaScript Date Reference Manual
Definition and Usage
getUTCDate()
The method returns the day of the month (from 1 to 31) of the date object according to the UTC time.
When calculating dates, the UTC method assumes that the date object is local time and date.
Tip:Coordinated Universal Time (UTC) is the standard time set by the world time standard.
Note:UTC time is the same as GMT time (Greenwich Mean Time).
Example
Example 1
Returns the day of the month according to the UTC time:
var d = new Date(); var n = d.getUTCDate();
Example 2
Returns the UTC day of the month for a specific local date-time:
var d = new Date("July 21, 1983 01:15:00"); var n = d.getUTCDate();
Syntax
Date.getUTCDate()
Parameters
No parameters.
Technical Details
Return Value: | Numeric value, ranging from 1 to 31, indicating the day of the month. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
getUTCDate() | Support | Support | Support | Support | Support |
Related Pages
Tutorial:JavaScript Date
Tutorial:JavaScript Date Format
Tutorial:JavaScript Object Constructor
- Previous Page getTimezoneOffset()
- Next Page getUTCDay()
- Go Back to the Previous Level JavaScript Date Reference Manual