Date.prototype.getUTCMonth() returns the month for this date as a zero-based integer 0–11 according to universal time (UTC) (MDN). 0 is January; 11 is December. It is read-only and does not change the Date.
Remember
date.getUTCMonth()
→ integer 0 … 11 (UTC)
→ NaN if the Date is invalid
Example (MDN):
new Date("December 31, 1975, 23:15:30 GMT+11:00").getUTCMonth() → 11 // Dec
new Date("December 31, 1975, 23:15:30 GMT-11:00").getUTCMonth() → 0 // Jan
getUTCMonth() → UTC month index
getMonth() → local month index
+ 1 → human month 1 … 12
Syntax
Call date.getUTCMonth. Start with this line.
JavaScript
date.getUTCMonth()
Call
What it does
date.getUTCMonth()
Primary signature.
date.getUTCMonth(...)
Call with the arguments your case needs.
Built into JavaScript. Call getUTCMonth(...) on a Date instance — no import required.
Library declarations
JavaScript
date.getUTCMonth()
Parameters
This method has no parameters beyond those shown in the signature.
Return Value
Return Value
Description
*
The value returned by date.getUTCMonth().
JavaScript Examples
Example 1 — Read the UTC Month
MDN: the same December wall time can be Dec or Jan in UTC.
JavaScript
const date1 = new Date("December 31, 1975, 23:15:30 GMT+11:00");
const date2 = new Date("December 31, 1975, 23:15:30 GMT-11:00");
console.log(date1.getUTCMonth()); // 11 — December
console.log(date2.getUTCMonth()); // 0 — January
Parse. Each string includes a GMT offset, so JavaScript stores a UTC instant.
date1.GMT+11:00 → still Dec 31 UTC → month 11.
date2.GMT-11:00 → rolls into Jan 1 UTC → month 0.
Lesson. Offsets can change the UTC month even when the typed date looks like “December 31”.
Example 2 — getUTCMonth() vs getMonth()
UTC and local months usually match mid-day; they can differ near month edges.
JavaScript
const d = new Date("1995-12-25T23:15:30Z"); // Dec 25, 1995 UTC
console.log(d.getUTCMonth()); // 11
console.log(d.getMonth()); // local month (often 11)