getUTCFullYear() 메서드는 표준시에 따라 지정된 날짜의 연도를 반환합니다.
Syntax
dateObj.getUTCFullYear()
Return value
주어진 날짜의 연도를 표준시에 따라 나타내는 숫자입니다.
Description
getUTCFullYear()에 의해 반환 된 값은 1995 년과 같이 2000 년과 호환되는 절대 숫자입니다.
Examples
Using getUTCFullYear()
다음 예제에서는 현재 연도의 4 자리 값을 변수 year에 할당합니다.
var today = new Date();
var year = today.getUTCFullYear();
Specifications
Specification | Status | Comment |
---|---|---|
ECMAScript 1st Edition (ECMA-262) | Standard | Initial definition. Implemented in JavaScript 1.3. |
ECMAScript 5.1 (ECMA-262) The definition of 'Date.prototype.getUTCFullYear' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'Date.prototype.getUTCFullYear' in that specification. |
Standard | |
ECMAScript Latest Draft (ECMA-262) The definition of 'Date.prototype.getUTCFullYear' in that specification. |
Draft |
Browser compatibility
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |