Date setDate() Parameter

This method accepts a single parameter as mentioned above and described below:

  • date_Value: It returns the new i.e updated date of the month which is set by the setDate() method. The date of the month is an integer value ranging from 1 to 31.

JavaScript Date setDate() Method

The setDate() method in JavaScript is used to set the day of the month for a specified date object, according to local time. It allows you to update the day part of the date without changing other parts like month and year.

Similar Reads

Date setDate() Syntax

dateObj.setDate(date_Value);...

Date setDate() Parameter

This method accepts a single parameter as mentioned above and described below:...

Date setDate() Return value:

This method returns the number of milliseconds between the date object and midnight of January 1, 1970...

JavaScript Date setDate() Method Examples

Example 1: Updating Day of the Month with JavaScript’s setDate()...