Flash Lite 2.x and 3.0 ActionScript Language Reference

getUTCMonth (Date.getUTCMonth method)

public getUTCMonth() : Number

Returns the month (0 [January] to 11 [December]) of the specified Date object, according to universal time.

Returns

Number - An integer.

Example

The following example creates a new Date object and uses Date.getUTCMonth() and Date.getMonth(). The value returned by Date.getUTCMonth() can differ from the value returned by Date.getMonth() if today's date is the first or last day of a month, depending on the relationship between your local time zone and universal time.

var today_date:Date = new Date();
trace(today_date.getMonth()); // output based on local timezone
trace(today_date.getUTCMonth()); // output equals getMonth() plus or minus 1

See also

getMonth (Date.getMonth method)