JavaScript Date getUTCFullYear() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Date

Definition

Date.prototype.getUTCFullYear() returns the full year for a date in UTC (for example 1975 or 2026). It is read-only and does not change the Date.

Remember
date.getUTCFullYear()

→ absolute year in UTC   (e.g. 1975, 1995, 2026)
→ NaN                    (if the Date is invalid)

getUTCFullYear() → year in UTC
getFullYear()    → year in local time
getYear()        → deprecated (year − 1900)

Syntax

Call date.getUTCFullYear. Start with this line.

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

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

Library declarations
JavaScript
date.getUTCFullYear()

Parameters

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

Return Value

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

JavaScript Examples

Example 1 — Read the UTC Full Year

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

JavaScript
const d = new Date(Date.UTC(1969, 6, 20)); // Jul 20, 1969 UTC

console.log(d.getUTCFullYear()); // 1969
Try It Yourself

How It Works

  1. Build a UTC date. Date.UTC(1969, 6, 20) is July 20, 1969 in UTC (month index 6).
  2. Wrap it in Date. new Date(...) stores that instant.
  3. Read the UTC year. getUTCFullYear() returns 1969.
  4. No side effects. The Date is unchanged; getUTCFullYear only reads.

Example 2 — Opposite Offsets, Different UTC Years

Same wall-clock label with GMT+11 vs GMT-11 can cross New Year 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.getUTCFullYear()); // 1975
console.log(date2.getUTCFullYear()); // 1976
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 December 31, 1975 → 1975.
  3. GMT−11 case. Local is behind UTC, so UTC has already entered January 1, 1976 → 1976.
  4. Lesson. “Dec 31” on a wall clock is not always year N in UTC — use getUTCFullYear() when UTC is the contract.

Example 3 — getUTCFullYear() vs getFullYear()

Compare UTC and local year getters on a late Dec 31 UTC instant.

JavaScript
const nye = new Date(Date.UTC(2025, 11, 31, 23, 30, 0));

console.log(nye.getUTCFullYear()); // 2025
console.log(nye.getFullYear());    // 2025 or 2026 (depends on TZ)
Try It Yourself

How It Works

  1. Create late Dec 31 UTC. Date.UTC(2025, 11, 31, 23, 30, 0) is still year 2025 in UTC.
  2. UTC getter is stable. getUTCFullYear() always returns 2025 for this instant.
  3. Local getter may differ. In timezones ahead of UTC, getFullYear() can already be 2026.
  4. Rule of thumb. Shared servers and APIs usually prefer UTC getters; UIs often prefer local getters.

Browser & Runtime Support

Date.prototype.getUTCFullYear() 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.getUTCFullYear()

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.getUTCFullYear() Excellent

Bottom line: Safe to use in any environment. Prefer it over deprecated getYear(). See also the MDN getUTCFullYear() reference.

Frequently Asked Questions

An integer for the full year in UTC (for example 1975 or 2026). For years 1000–9999 it is typically a four-digit number. Invalid dates return NaN.
getUTCFullYear() uses UTC. getFullYear() uses the local timezone. Near New Year’s midnight they can differ by one year.
No. getYear() is deprecated and returns year minus 1900. getUTCFullYear() returns the absolute UTC year.
NaN. Validate with Number.isNaN(date.getTime()) before using the result.
Use getUTCFullYear() when you store or display calendar parts in UTC (APIs, logs, shared servers). Use getFullYear() for the user’s local year.
For wire formats, toISOString() is usually enough. Use getUTCFullYear() when you assemble UTC parts manually or teach how UTC getters work.

Next: getUTCHours()

Learn how to read the hour of the day (0–23) from a Date in UTC.

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