We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

현재 번역은 완벽하지 않습니다. 한국어로 문서 번역에 동참해주세요.

getUTCDay() 메서드는 지정된 날짜의 요일을 표준시에 따라 반환합니다. 여기서 0은 일요일을 나타냅니다.



Return value

지정된 날짜의 요일에 해당하는 표준시에 따른 정수입니다 (일요일은 0, 월요일은 1, 화요일은 2 등).


Using getUTCDay()

다음 예제에서는 현재 날짜의 평일 부분을 weekday 변수에 할당합니다.

var today = new Date();
var weekday = today.getUTCDay();


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.getUTCDay' in that specification.
ECMAScript 2015 (6th Edition, ECMA-262)
The definition of 'Date.prototype.getUTCDay' in that specification.
ECMAScript Latest Draft (ECMA-262)
The definition of 'Date.prototype.getUTCDay' in that specification.

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)

See also

문서 태그 및 공헌자

이 페이지의 공헌자: imskojs
최종 변경: imskojs,