User Guide

Date 343
Returns
Number - An integer.
Example
The following example creates a new Date object and uses
getUTCSeconds() to return the
seconds value from the Date object:
var today_date:Date = new Date();
trace(today_date.getUTCSeconds());
getUTCYear (Date.getUTCYear method)
public getUTCYear() : Number
Returns the year of this Date according to universal time (UTC). The year is the full year
minus 1900. For example, the year 2000 is represented as 100.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
Number -
Example
The following example creates a new Date object and uses
Date.getUTCFullYear() and
Date.getFullYear(). The value returned by Date.getUTCFullYear() may differ from the
value returned by
Date.getFullYear() if today's date is December 31 or January 1,
depending on the relationship between your local time zone and universal time.
var today_date:Date = new Date();
trace(today_date.getFullYear()); // display based on local timezone
trace(today_date.getUTCFullYear()); // displays getYear() plus or minus 1
getYear (Date.getYear method)
public getYear() : Number
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.
Availability: ActionScript 1.0; Flash Lite 2.0