Sets month of year.

Syntax

<oRef>.setMonth(<expN>)

<oRef>

The Date object whose month you want to change.

<expN>

The month number, normally between 0 and 11: 0 for January, 1 for February, and so on, up to 11 for December.

Property of

Date

Description

The setMonth( ) method sets the month of year for the Date object.