EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 356

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
356 Chapter 12: ActionScript Dictionary
Date.getTime()
Availability
Flash Player 5.
Usage
my_date.getTime()
Parameters
None.
Returns
An integer.
Description
Method; returns the number of milliseconds since midnight January 1, 1970, universal time, for
the specified Date object. Use this method to represent a specific instant in time when comparing
two or more Date objects.
Date.getTimezoneOffset()
Availability
Flash Player 5.
Usage
my_date.getTimezoneOffset()
Parameters
None.
Returns
An integer.
Description
Method; returns the difference, in minutes, between the computer’s local time and universal time.
Example
The following example returns the difference between the local daylight saving time for San
Francisco and universal time. Daylight saving time is factored into the returned result only if the
date defined in the Date object occurs during daylight saving time.
trace(new Date().getTimezoneOffset());
// 420 is displayed in the Output panel
// (7 hours * 60 minutes/hour = 420 minutes)
// This example is Pacific Daylight Time (PDT, GMT-0700).
// Result will vary depending on locale and time of year.

Table of Contents

Related product manuals