Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
setUTCDate() 메서드는 UTC 시간을 기준으로 지정된 Date 인스턴스의 날짜를 변경합니다.
표준시 대신 현지 시간을 기준으로 하는 Date 인스턴스의 날짜를 변경하려면 setDate() 메소드를 사용하세요.
한 달의 날짜를 나타내는 1에서 31 사이의 정수입니다.
1970년 1월 1일 00:00:00 UTC와 업데이트 된 날짜 사이의 밀리 초 숫자입니다.
dayValue가 해당 월의 날짜 값 범위를 벗어나면 setDate()는 그에 맞춰 Date 객체를 업데이트합니다.
예를 들어 dayValue에 0을 입력하면 날짜는 전월 말일로 설정됩니다. dayValue에 40을 사용하고 Date 객체에 저장된 월이 6월이면 날짜는 10으로 변경되고 월은 7월로 증가합니다.
dayValue에 음수를 입력하면 전월 말일부터 역순으로 날짜가 설정됩니다. -1을 사용하면 날짜가 이전 달의 마지막 날 1일로 설정됩니다.
| ECMAScript® 2027 Language Specification # sec-date.prototype.setutcdate |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025년 2월 11일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.