Return the month, according to universal time:
The result of n will be:
The getMonth() method returns the month (from 0 to 11) for the specified date, according to universal time.
Note: January is 0, February is 1, and so on.
The UTC methods calculate their date assuming that the date object is of local time and date.
Tip: The Universal Coordinated Time (UTC) is the time set by the World Time Standard.
Note: UTC time is the same as GMT time.
![]()
The getUTCMonth() method is supported in all major browsers.
| Type | Description |
|---|---|
| Number | A Number, from 0-11, representing the month |
| JavaScript Version: | 1.3 |
|---|
Return the name of the month (not just a number):
The result of n will be:
JavaScript Date Object
Your message has been sent to W3Schools.