JavaScriptDategetDate

Returns the day of the month (1-31) for the specified date.

Syntax

date.getDate()

Example

Enter values below to update the example in real time.

const
new
console
const date = new Date(2024, 0, 25);
console.log(date.getDate());   // 25