Date.prototype.getDate()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since â¨2015ë 7ìâ©.
getDate() ë©ìëë 주ì´ì§ ë ì§ì íì§ ìê° ê¸°ì¤ ì¼ì ë°íí©ëë¤.
ìëí´ ë³´ê¸°
const birthday = new Date("August 19, 1975 23:15:30");
const date1 = birthday.getDate();
console.log(date1);
// Expected output: 19
구문
js
dateObj.getDate();
ë°í ê°
íì§ ìê°ì ë°ë¼, 주ì´ì§ ë ì§ì ì¼ì í´ë¹íë 1 ì´ì 31 ì´íì ì ì.
ìì
>getDate() ì¬ì©í기
ìë ì½ëì ë ë²ì§¸ ëª
ë ¹ë¬¸ì Xmas95ì ê°ì 기ë°íì¬ dayì 2를 í ë¹í©ëë¤.
js
var Xmas95 = new Date("December 25, 1995 23:15:30");
var day = Xmas95.getDate();
console.log(day); // 25
ëª ì¸
| Specification |
|---|
| ECMAScript® 2026 Language Specification > # sec-date.prototype.getdate > |