User Guide
Date 491
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)
getUTCSeconds (Date.getUTCSeconds method)
public getUTCSeconds() : Number
Returns the seconds (an integer from 0 to 59) 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
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 Player 8