03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

The following example uses the constructor to create a Date object based on the current time.<br />

It also uses the getLocaleLongDate() method to return the current date, in long form,<br />

formatted according to the currently defined locale, as follows:<br />

var my_date:Date = new Date();<br />

trace(my_date.getLocaleLongDate());<br />

The following are sample return values that getLocaleLongDate() returns:<br />

October 16, 2005<br />

16 October 2005<br />

getLocaleShortDate (Date.getLocaleShortDate<br />

method)<br />

public getLocaleShortDate() : String<br />

Returns a string representing the current date, in short form, formatted according to the<br />

currently defined locale.<br />

Note: The format of the date depends on the mobile device <strong>and</strong> the locale.<br />

Returns<br />

String - A string representing the current date, in short form, formatted according to the<br />

currently defined locale.<br />

Example<br />

The following example uses the constructor to create a Date object based on the current time.<br />

It also uses the getLocaleShortDate() method to return the current date, in short form,<br />

formatted according to the currently defined locale, as follows:<br />

var my_date:Date = new Date();<br />

trace(my_date.getLocaleShortDate());<br />

The following are sample return values that getLocaleLongDate() returns:<br />

10/16/2005<br />

16-10-2005<br />

getLocaleTime (Date.getLocaleTime method)<br />

public getLocaleTime() : String<br />

Returns a string representing the current time, formatted according to the currently defined<br />

locale.<br />

Note: The format of the date depends on the mobile device <strong>and</strong> the locale.<br />

312 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!