August 1999
Intermediate to advanced
1488 pages
72h 53m
English
date.getYear()
The getYear() method returns the year portion of the Date object. Unfortunately, the year is represented as either a two-digit number or a four-digit number, depending on the browser version. For example, the year 1983 may be returned from the methods as 1983 or just 83. The getYear() method was depreciated in JavaScript 1.2 in favor of the getFullYear() method.
Caution
Netscape version 2 and 3 display the years from 1900 to 1999 by subtracting 1900 from the year to effectively create a two-digit representation of the year. Years less than 1900 and greater than 1999 are displayed as four-digit numbers.
Netscape version ...
Read now
Unlock full access