method Date.setMonth
Private
Date.setMonth(
month: number,
date?: number,
): number

Sets the month value in the Date object using local time.

Parameters

month: number

A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.

optional
date: number

A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.

Return Type

number