Javascript Reference
Categories: Date

javascript Date setYear( )

@March 15, 2008, 1:22 a.m.
setYear( )Firefox/Netscape/NN 2 IE 3 ECMA n/a  

setYear(yearInt)

  

Sets the year of an instance of a Date object. Use setFullYear( ) if the browser versions you support allow it. Note that this method is not an ECMA-supported method, whereas setFullYear( ) is.

 
Parameters
 
yearInt

Four-digit (and sometimes two-digit) integers representing a year.

 
Returned Value

New date in milliseconds.


Powered by Linode.