Date.prototype.getDate()
Returns the day of the month of a date in local time.
Syntax
date.getDate()
Returns
number — The day of the month, 1 through 31.
Examples
const d = new Date("2026-05-15T12:00:00");
console.log(d.getDate());
Output
15
const d = new Date("2026-02-01T12:00:00");
console.log(d.getDate());
Output
1
Notes
- Returns the day-of-month (1-31), not the weekday; use `getDay()` for
the weekday.
- Use `getUTCDate()` for the UTC day of month.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |
| node | 0.10 |