Standard built-ins

Date.prototype.getUTCFullYear()

Try the free JavaScript compiler

UTC year, not a year offset. Invalid date returns NaN. Local methods use host zone; example constructs local calendar fields.

Formal Syntax & Structure

javascript syntaxjavascript
date.getUTCFullYear()

Return Value

Number

Calendar field or NaN.

Working Example

Example Snippetjavascript
console.log((new Date("2024-01-02T03:00:00Z")).getUTCFullYear());
JavaScript Reference