JavaScript Date getUTCDate() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Date

Definition

Date.prototype.getUTCDate() returns the day of the month (1–31) for a date in UTC (universal time). It is read-only and does not change the Date.

Remember
date.getUTCDate()

→ integer 1 … 31   (UTC calendar day)
→ NaN              (if the Date is invalid)

getUTCDate() → day of month in UTC
getDate()    → day of month in local time
getUTCDay()  → weekday in UTC (0–6)

Syntax

Call date.getUTCDate. Start with this line.

JavaScript
date.getUTCDate()
CallWhat it does
date.getUTCDate()Primary signature.
date.getUTCDate(...)Call with the arguments your case needs.

Built into JavaScript. Call getUTCDate(...) on a Date instance — no import required.

Library declarations
JavaScript
date.getUTCDate()

Parameters

This method has no parameters beyond those shown in the signature.

Return Value

Return ValueDescription
*The value returned by date.getUTCDate().

JavaScript Examples

Example 1 — Read the UTC Day of the Month

Build a UTC instant with Date.UTC, then call getUTCDate().

JavaScript
const d = new Date(Date.UTC(2026, 2, 15)); // Mar 15, 2026 UTC

console.log(d.getUTCDate()); // 15
Try It Yourself

How It Works

  1. Build a UTC date. Date.UTC(2026, 2, 15) means year 2026, month index 2 (March), day 15 in UTC.
  2. Wrap it in Date. new Date(...) stores that instant.
  3. Read the UTC day. getUTCDate() returns 15.
  4. No side effects. The Date is unchanged; getUTCDate only reads.

Example 2 — Opposite Offsets, Different UTC Days

Same wall-clock label with GMT+11 vs GMT-11 maps to different UTC calendar days.

JavaScript
const date1 = new Date("August 19, 1975 23:15:30 GMT+11:00");
const date2 = new Date("August 19, 1975 23:15:30 GMT-11:00");

console.log(date1.getUTCDate()); // 19
console.log(date2.getUTCDate()); // 20
Try It Yourself

How It Works

  1. Parse with an offset. Each string includes a timezone offset in the text.
  2. GMT+11 case. Local is ahead of UTC, so UTC is still August 19 → 19.
  3. GMT−11 case. Local is behind UTC, so UTC has already rolled to August 20 → 20.
  4. Lesson. Wall-clock “the 19th” is not always UTC day 19 — use getUTCDate() when UTC is the contract.

Example 3 — Add Days with setUTCDate(getUTCDate() + n)

Shift a UTC date forward; overflow rolls into the next month in UTC.

JavaScript
const future = new Date(Date.UTC(2026, 0, 28)); // Jan 28, 2026 UTC

future.setUTCDate(future.getUTCDate() + 7);

console.log(future.getUTCDate());  // 4
console.log(future.getUTCMonth()); // 1 (February)
Try It Yourself

How It Works

  1. Start on Jan 28 UTC. getUTCDate() is 28.
  2. Add seven days. setUTCDate(28 + 7) asks for UTC day 35 of January.
  3. Engine normalizes. January has 31 days, so day 35 becomes February 4 UTC.
  4. Read back. getUTCDate() is 4; UTC month index is 1 (February).

Browser & Runtime Support

Date.prototype.getUTCDate() has been in JavaScript since ES1. It is Baseline and works in every modern browser and Node.js — no polyfill needed.

✓ Baseline · ES1

Date.prototype.getUTCDate()

Supported everywhere Date exists: Chrome, Firefox, Safari, Edge, Internet Explorer, and all Node.js versions.

99% Universal API
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.getUTCDate() Excellent

Bottom line: Safe to use in any environment. Focus on UTC vs local correctness. See also the MDN getUTCDate() reference.

Frequently Asked Questions

An integer from 1 to 31 for the day of the month in UTC (Coordinated Universal Time). It is the UTC calendar day, not the local calendar day.
getUTCDate() uses UTC. getDate() uses the local timezone. Near midnight or across large offsets they can differ by one day.
getUTCDate() returns the day of the month (1–31). getUTCDay() returns the weekday in UTC (0–6, Sunday = 0).
NaN. Validate with Number.isNaN(date.getTime()) before using the result.
Use getUTCDate() when you store or display calendar parts in UTC (APIs, logs, shared servers). Use getDate() for the user’s local calendar day.
Use setUTCDate(getUTCDate() + n). Overflow rolls into the next month automatically in UTC, similar to setDate for local time.

Next: getUTCDay()

Learn how to read the weekday index in UTC from Sunday (0) through Saturday (6).

getUTCDay() 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