Flash Lite 2.x and 3.0 ActionScript Language Reference

getFullYear (Date.getFullYear method)

public getFullYear() : Number

Returns the full year (a four-digit number, such as 2000) of the specified Date object, according to local time. Local time is determined by the operating system on which Flash Player is running.

Returns

Number - An integer representing the year.

Example

The following example uses the constructor to create a Date object. The trace statement shows the value returned by the getFullYear() method.

var my_date:Date = new Date();
trace(my_date.getYear()); // displays 104
trace(my_date.getFullYear()); // displays current year