Полезная информация

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Date.setYear() Method

Name

Date.setYear() Method---set the year field of a Date

Availability

Navigator 2.0, Internet Explorer 3.0

Synopsis

date.setYear(year)

Arguments

year

An integer which is set as the year value for the Date object date. Usually, you should use four-digit format for year specifications. For example, specify 2001 for the year 2001. For years within the 20th century, you can also subtract 1900 and specify the date in two-digit format. For example, you could specify 97 for the year 1997.

Returns

nothing

See Also

"Date", "Date.getYear()"


Previous Home Next
Date.setTime() Book Index Date.toGMTString()

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell