Tostring (Date.tostring Method); Utc (Date.utc Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

toString (Date.toString method)

public toString() : String
Returns a string value for the specified date object in a readable format.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- A string.
String
Example
The following example returns the information in the
string. The output from the trace statements are in local time and vary accordingly. For Pacific
Daylight Time the output is seven hours earlier than universal time: Mon Aug 12 18:15:00
GMT-0700 1974.
var dateOfBirth_date:Date = new Date(74, 7, 12, 18, 15);
trace (dateOfBirth_date);
trace (dateOfBirth_date.toString());

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 Lite 2.0
Parameters
- A four-digit integer that represents the year (for example, 2000).
year:Number
- An integer from 0 (January) to 11 (December).
month:Number
[optional] - An integer from 1 to 31.
date:Number
[optional] - An integer from 0 (midnight) to 23 (11 p.m.).
hour:Number
[optional] - An integer from 0 to 59.
minute:Number
[optional] - An integer from 0 to 59.
second:Number
millisecond:Number
356
ActionScript classes
[optional] - An integer from 0 to 999.
Date object as a
dateOfBirth_date

Advertisement

Table of Contents
loading

Table of Contents