JavaScript getUTCDate()Method
Example
Return the day of a month (UTC) according to universal time:
var d = new Date();
var n = d.getUTCDate();
var n = d.getUTCDate();
nOutput:
Try it Yourself »
Definition and Usage
The getUTCDate() method returns the day of a month (UTC) according to universal time.
Coordinated Universal Time (UTC) is a time measurement system based on the atomic second length, which is as close as possible to universal time.
Tip:Coordinated Universal Time, also known as Universal Time Coordinated, World Standard Time, International Coordinated Time, abbreviated as UTC (Universal Coordinated Time).
Note:UTC time is the same as GMT (Greenwich) time.
Browser Support
![]()
![]()
![]()
![]()
![]()
getUTCDate() All major browsers support the getUTCDate() method
Syntax
Date.getUTCDate()
Return Value
| Type | Description |
|---|---|
| Number | Returns the day of the month (a value from 1 to 31). |
Technical Details
| JavaScript Version: | 1.3 |
|---|
More Examples
Example
Here we define a variable with a specific date, and then output the day of the month in the variable according to UTC:
var d = new Date("July 21, 1983 01:15:00");
var n = d.getUTCDate();
var n = d.getUTCDate();
nOutput:
Try it Yourself »
Other Extensions
JavaScript Date Object