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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

The following example creates a new Date object <strong>and</strong> uses Date.getUTCDay() <strong>and</strong><br />

Date.getDay(). The value returned by Date.getUTCDay() can differ from the value<br />

returned by Date.getDay(), depending on the relationship between your local time zone<br />

<strong>and</strong> universal time.<br />

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

trace(today_date.getDay()); // output will be based on local timezone<br />

trace(today_date.getUTCDay()); // output will equal getDay() plus or minus<br />

one<br />

See also<br />

getDay (Date.getDay method)<br />

getUTCFullYear (Date.getUTCFullYear method)<br />

public getUTCFullYear() : Number<br />

Returns the four-digit year of the specified Date object, according to universal time.<br />

Returns<br />

Number - An integer.<br />

Example<br />

The following example creates a new Date object <strong>and</strong> uses Date.getUTCFullYear() <strong>and</strong><br />

Date.getFullYear(). The value returned by Date.getUTCFullYear() may differ from the<br />

value returned by Date.getFullYear() if today's date is December 31 or January 1,<br />

depending on the relationship between your local time zone <strong>and</strong> universal time.<br />

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

trace(today_date.getFullYear()); // display based on local timezone<br />

trace(today_date.getUTCFullYear()); // displays getYear() plus or minus 1<br />

See also<br />

getFullYear (Date.getFullYear method)<br />

getUTCHours (Date.getUTCHours method)<br />

public getUTCHours() : Number<br />

Returns the hour (an integer from 0 to 23) of the specified Date object, according to universal<br />

time.<br />

Date 317

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

Saved successfully!

Ooh no, something went wrong!