User Guide

254 Chapter 2: ActionScript Language Reference
Date.getUTCHours()
Availability
Flash Player 5.
Usage
my_date.getUTCHours() : Number
Parameters
None.
Returns
An integer.
Description
Method; returns the hour (an integer from 0 to 23) of the specified Date object, according
to universal time.
Example
The following example creates a new Date object and uses Date.getUTCHours() and
Date.getHours(). The value returned by
Date.getUTCHours() may differ from the value
returned by
Date.getHours(), depending on the relationship between your local time zone and
universal time.
var today_date:Date = new Date();
trace(today_date.getHours()); // display based on local timezone
trace(today_date.getUTCHours()); // display equals getHours() plus or minus 12