Set Month Method
The Set Month method sets the month of dateVar to the value you specify in the month argument. You can optionally set the day of month to the date argument. For more information, see Values for Dates and Times.
Format
dateVar.setMonth(month[, date])
The following table describes the arguments for the Set Month method.
Argument | Description |
---|---|
month |
The month to set in dateVar as an integer from 0 through 11. |
date |
The date of the month argument to set in dateVar as an integer from 1 through 31. |