getUTCFullYear (Date.getUTCFullYear method)

public getUTCFullYear() : Number

Returns the four-digit year of the specified Date object, according to universal time.

Availability: ActionScript 1.0; Flash Player 5

Returns

Number - An integer.

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

See also

getFullYear (Date.getFullYear method)


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001594.html