JavaScript Date getUTCMonth()
Examples
Get the month, according to universal time:
let month = d.getUTCMonth();
Get the name of the month (not just a number):
const d = new Date()
let month = month[d.getUTCMonth()];
Description
getUTCMonth()
returns the month (0 to 11) of a date.
getUTCMonth()
returns the month according to UTC.
January = 0, February = 1, ... (See below):
Notes
UTC (Universal Time Coordinated) is the time set by the World Time Standard.
UTC time is the same as GMT time (Greenwich Mean Time).
All JavaScript getUTC methods assume that the date is of local time.
Syntax
Parameters
Return Value
Browser Support
getUTCMonth()
is an ECMAScript1 (JavaScript 1997) feature.
It is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |