EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Getlocaletime (Date.getlocaletime Method); Getmilliseconds (Date.getmilliseconds Method)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Date 335
Example
The following example uses the constructor to create a Date object based on the current time.
It also uses the
getLocaleShortDate() method to return the current date, in short form,
formatted according to the currently defined locale, as follows:
var my_date:Date = new Date();
trace(my_date.getLocaleShortDate());
The following are sample return values that getLocaleLongDate() returns:
10/16/2005
16-10-2005
getLocaleTime (Date.getLocaleTime method)
public getLocaleTime() : String
Returns a string representing the current time, formatted according to the currently defined
locale.
Note: The format of the date depends on the mobile device and the locale.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
String - A string representing the current time, formatted according to the currently defined
locale.
Example
The following example uses the constructor to create a Date object based on the current time.
It also uses the
getLocaleTime() method to return the time of the current locale, as follows:
var my_date:Date = new Date();
trace(my_date.getLocaleTime());
The following are sample return values that getLocaleTime() returns:
6:10:44 PM
18:10:44
getMilliseconds (Date.getMilliseconds method)
public getMilliseconds() : Number
Returns the milliseconds (an integer from 0 to 999) of the specified Date object, according to
local time. Local time is determined by the operating system on which Flash Player is
running.
Availability: ActionScript 1.0; Flash Lite 2.0

Table of Contents

Related product manuals