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월.
setDate() 메서드는 현재 설정된 월의 시작 부분을 기준으로 Date 객체의 날짜를 설정합니다.
월의 일을 나타내는 정수입니다.
1970 년 1 월 1 일 00:00:00 UTC와 주어진 날짜 사이의 밀리 초 (Date 개체도 변경됩니다).
dayValue가 해당 월의 날짜 값 범위를 벗어나면 setDate ()는 그에 따라 Date 객체를 업데이트합니다. 예를 들어, dayValue에 0이 제공되면 날짜는 이전 달의 마지막 날로 설정됩니다.
| ECMAScript® 2027 Language Specification # sec-date.prototype.setdate |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023년 8월 8일 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.