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.

minute:Number [optional] - An integer from 0 to 59.<br />

second:Number [optional] - An integer from 0 to 59.<br />

millisecond:Number [optional] - An integer from 0 to 999 of milliseconds.<br />

Example<br />

The following example retrieves the current date <strong>and</strong> time:<br />

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

The following example creates a new Date object for Mary's birthday, August 12, 1974<br />

(because the month parameter is zero-based, the example uses 7 for the month, not 8):<br />

var maryBirthday:Date = new Date (74, 7, 12);<br />

The following example creates a new Date object <strong>and</strong> concatenates the returned values of<br />

Date.getMonth(), Date.getDate(), <strong>and</strong> Date.getFullYear():<br />

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

var date_str:String = ((today_date.getMonth()+1)+"/<br />

"+today_date.getDate()+"/"+today_date.getFullYear());<br />

trace(date_str); // displays current date in United States date format<br />

See also<br />

getMonth (Date.getMonth method), getDate (Date.getDate method), getFullYear<br />

(Date.getFullYear method)<br />

getDate (Date.getDate method)<br />

public getDate() : Number<br />

Returns the day of the month (an integer from 1 to 31) of the specified Date object according<br />

to local time. Local time is determined by the operating system on which Flash Player is<br />

running.<br />

Returns<br />

Number - An integer.<br />

Example<br />

The following example creates a new Date object <strong>and</strong> concatenates the returned values of<br />

Date.getMonth(), Date.getDate(), <strong>and</strong> Date.getFullYear():<br />

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

var date_str:String = (today_date.getDate()+"/<br />

"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());<br />

trace(date_str); // displays current date in United States date format<br />

Date 309

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

Saved successfully!

Ooh no, something went wrong!