# setDate method

The `setDate` method allows you to change the value of the day of the month for `date object`.

## Syntax

`date.setDate(day);`

## Example

Let's set the day:

`let date = new Date(); date.setDate(1); console.log(date);`

## See also

- the `setFullYear` method
  that sets the year
- the `setMonth` method
  that sets the month
- the `setHours` method
  that sets the hours
- the `setMinutes` method
  that sets the minutes
- the `setSeconds` method
  that sets the seconds

← →
↑
en ru