English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript getUTCFullYear() Method

 JavaScript Date Object

getUTCFullYear()Returns the year of the specific date object based on UTC time (4digits).

getUTCFullYear()The returned value is a number that is2An absolute number compatible with 000 years, such as2004.

World Standard Time (UTC) is the time standard set for world time.

Syntax:

date.getUTCFullYear()
var d = new Date();
d.getUTCFullYear();
Test and see‹/›

Browser Compatibility

All browsers fully support the getUTCFullYear() method:

Method
getUTCFullYear()YesYesYesYesYes

Technical Details

Return Value:A number representing the year
JavaScript Version:ECMAScript 1

More Examples

Return the year of a specific date and time:

var d = new Date('August 20, 2004 23:15:30');
d.getUTCFullYear();
Test and see‹/›

 JavaScript Date Object