--- title: Date.prototype.getUTCFullYear() slug: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear translation_of: Web/JavaScript/Reference/Global_Objects/Date/getUTCFullYear ---
getUTCFullYear() 메서드는 표준시에 따라 지정된 날짜의 연도를 반환합니다.
dateObj.getUTCFullYear()
주어진 날짜의 연도를 표준시에 따라 나타내는 숫자입니다.
getUTCFullYear()에 의해 반환 된 값은 1995 년과 같이 2000 년과 호환되는 절대 숫자입니다.
getUTCFullYear()다음 예제에서는 현재 연도의 4 자리 값을 변수 year에 할당합니다.
var today = new Date(); var year = today.getUTCFullYear();
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('ES1')}} | {{Spec2('ES1')}} | Initial definition. Implemented in JavaScript 1.3. |
| {{SpecName('ES5.1', '#sec-15.9.5.11', 'Date.prototype.getUTCFullYear')}} | {{Spec2('ES5.1')}} | |
| {{SpecName('ES6', '#sec-date.prototype.getutcfullyear', 'Date.prototype.getUTCFullYear')}} | {{Spec2('ES6')}} | |
| {{SpecName('ESDraft', '#sec-date.prototype.getutcfullyear', 'Date.prototype.getUTCFullYear')}} | {{Spec2('ESDraft')}} |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
| Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|
| Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |