Flash Lite 2.x and 3.0 ActionScript Language Reference

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.

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