English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
date.getUTCFullYear()
var d = new Date(); d.getUTCFullYear();Test and see‹/›
All browsers fully support the getUTCFullYear() method:
Method | |||||
getUTCFullYear() | Yes | Yes | Yes | Yes | Yes |
Return Value: | A number representing the year |
---|---|
JavaScript Version: | ECMAScript 1 |
Return the year of a specific date and time:
var d = new Date('August 20, 2004 23:15:30'); d.getUTCFullYear();Test and see‹/›