Language Reference setYear Method


Description

Sets the year value in the Date object.

Syntax

dateObj.setYear( numYear )

Arguments

numYear: A numeric value equal to the desired year minus 1900.

Remarks
To set the year of a Date object to 1997, call setYear(97). To get 2010, call setYear(110).