Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript classes > Date > UTC (Date.UTC method) | |||
public static UTC(year:Number, month:Number, [date:Number], [hour:Number], [minute:Number], [second:Number], [millisecond:Number]) : Number
Returns the number of milliseconds between midnight on January 1, 1970, universal time, and the time specified in the parameters. This is a static method that is invoked through the Date object constructor, not through a specific Date object. This method lets you create a Date object that assumes universal time, whereas the Date constructor assumes local time.
Availability: ActionScript 1.0; Flash Player 5
year:Number - A four-digit integer that represents the year (for example, 2000).
month:Number - An integer from 0 (January) to 11 (December).
date:Number [optional] - An integer from 1 to 31.
hour:Number [optional] - An integer from 0 (midnight) to 23 (11 p.m.).
minute:Number [optional] - An integer from 0 to 59.
second:Number [optional] - An integer from 0 to 59.
millisecond:Number [optional] - An integer from 0 to 999.
Number - An integer.
The following example creates a new maryBirthday_date Date object defined in universal time. This is the universal time variation of the example used for the new Date constructor method. The output is in local time and varies accordingly. For Pacific Daylight Time the output is seven hours earlier than UTC: Sun Aug 11 17:00:00 GMT-0700 1974.
var maryBirthday_date:Date = new Date(Date.UTC(1974, 7, 12)); trace(maryBirthday_date);
Version 8
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00002167.html
Comments
Fumio Nonaka said on Jan 16, 2006 at 11:42 PM :