myDate.setMonth( month, [ day ] ) in ECMAScript 262

Set the zero-based month, expressed in the local timezone.

Arguments

nametypedescription
month Number The new month number, expresse
day Number [optional] The new day number, expressed<
Return Type
Number

Description

If the optional day parameter is omitted, it is left unchanged in the date object.