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 returns the difference between the local daylight saving time for San<br />

Francisco <strong>and</strong> universal time. Daylight saving time is factored into the returned result only if<br />

the date defined in the Date object occurs during daylight saving time. The output in this<br />

example is 420 minutes <strong>and</strong> displays in the Output panel (7 hours * 60 minutes/hour = 420<br />

minutes). This example is Pacific Daylight Time (PDT, GMT-0700). The result varies<br />

depending on location <strong>and</strong> time of year.<br />

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

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

getUTCDate (Date.getUTCDate method)<br />

public getUTCDate() : Number<br />

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

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.getUTCDate() <strong>and</strong><br />

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

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

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

var my_date:Date = new Date(2004,8,25);<br />

trace(my_date.getUTCDate()); // output: 25<br />

See also<br />

getDate (Date.getDate method)<br />

getUTCDay (Date.getUTCDay method)<br />

public getUTCDay() : Number<br />

Returns the day of the week (0 for Sunday, 1 for Monday, <strong>and</strong> so on) of the specified Date<br />

object, according to universal time.<br />

Returns<br />

Number - An integer.<br />

316 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!