August 1999
Intermediate to advanced
1488 pages
72h 53m
English
date.setFullYear(year)
The setFullYear() method sets the year in the Date object to the argument year, a four-digit integer. The method returns an integer representing the number of milliseconds between midnight January 1, 1970 (GMT) to the date and time specified in the Date object after the year has been adjusted.
The code in Listing 6.93 displays the current date in milliseconds before setting the year to 2003. Notice that the milliseconds specified after the setFullYear() method are the same as the result returned from the method.
<html> <script language="JavaScript"> ... |
Read now
Unlock full access