User Guide
Date.getYear() 259
Date.getYear()
Availability
Flash Player 5.
Usage
my_date.getYear() : Number
Parameters
None.
Returns
An integer.
Description
Method; returns the year of the specified Date object, according to local time. Local time is
determined by the operating system on which Flash Player is running. The year is the full year
minus 1900. For example, the year 2000 is represented as 100.
Example
The following example creates a Date object with the month and year set to May 2004. The
Date.getYear() method returns 104, and Date.getFullYear() returns 2004:
var today_date:Date = new Date(2004,4);
trace(today_date.getYear()); // output: 104
trace(today_date.getFullYear()); // output: 2004
See also
Date.getFullYear()