JavaScript Date getUTCMonth() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Date

Definition

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()
CallWhat 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 ValueDescription
*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
Try It Yourself

How It Works

  1. Parse. Each string includes a GMT offset, so JavaScript stores a UTC instant.
  2. date1. GMT+11:00 → still Dec 31 UTC → month 11.
  3. date2. GMT-11:00 → rolls into Jan 1 UTC → month 0.
  4. 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)
Try It Yourself

How It Works

  1. UTC instant. The Z suffix means December 25 in UTC → month 11.
  2. UTC getter. getUTCMonth() always reports 11 here.
  3. Local getter. getMonth() can differ near midnight month boundaries in some zones.
  4. Rule. Server / UTC pipelines → getUTCMonth(); wall-clock local → getMonth().

Example 3 — Map Index to Month Name

Use the zero-based index with a names array; add 1 for human 1–12.

JavaScript
const months = [
  "January", "February", "March", "April", "May", "June",
  "July", "August", "September", "October", "November", "December"
];

const d = new Date(Date.UTC(2026, 6, 20)); // July = 6
console.log(d.getUTCMonth());              // 6
console.log(months[d.getUTCMonth()]);      // "July"
console.log(d.getUTCMonth() + 1);          // 7 (human month)
Try It Yourself

How It Works

  1. Index. Date.UTC(..., 6, ...) means July because months are zero-based.
  2. Read. getUTCMonth() returns 6.
  3. Name. months[6] → "July".
  4. i18n tip. For other languages, prefer Intl.DateTimeFormat with timeZone: "UTC" over a hard-coded English array.

Browser & Runtime Support

Date.prototype.getUTCMonth() is part of the language from early ECMAScript and is Baseline Widely available (MDN).

✓ Baseline · Widely available

Date.prototype.getUTCMonth()

Supported in every modern browser and Node.js. No polyfill needed for ordinary web apps.

99% Modern browser support
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
Date.getUTCMonth() Excellent

Bottom line: Safe everywhere. Focus on zero-based months, UTC vs local, and invalid-Date checks rather than feature detection.

Frequently Asked Questions

An integer from 0 to 11 for the month according to UTC: 0 is January, 1 is February, … 11 is December. Invalid Dates return NaN.
JavaScript uses a zero-based month index — the same as Date.UTC’s month argument and getMonth(). Add 1 when you need human month numbers 1–12.
getUTCMonth() uses UTC. getMonth() uses local timezone rules. Near midnight on month boundaries they can differ.
NaN. Validate with Number.isNaN(date.getTime()) before using the result.
Index an English names array with getUTCMonth(), or prefer Intl.DateTimeFormat / toLocaleDateString with timeZone: "UTC" for locale-aware names.
No for valid dates — the range is 0–11. Overflow from setUTCMonth rolls into the next UTC year.

Next: getUTCSeconds()

Learn how to read the UTC seconds field (0–59) from a Date.

getUTCSeconds() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful