EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 352

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...
352 Chapter 12: ActionScript Dictionary
date An integer from 1 to 31. This parameter is optional.
hour An integer from 0 (midnight) to 23 (11 p.m.).
minute An integer from 0 to 59. This parameter is optional.
second An integer from 0 to 59. This parameter is optional.
millisecond An integer from 0 to 999. This parameter is optional.
Returns
Nothing.
Description
Object; constructs a new Date object that holds the current date and time, or the date specified.
Example
The following example retrieves the current date and time.
now_date = new Date();
The following example creates a new Date object for Garys birthday, August 12, 1974. (Because
the month parameter is zero-based, the example uses 7 for the month, not 8.)
garyBirthday_date = new Date (74, 7, 12);
The following example creates a new Date object, concatenates the returned values of
Date.getMonth(), Date.getDate(), and Date.getFullYear(), and displays them in the text
field specified by the variable
date_str.
today_date = new Date();
date_str = ((today_date.getMonth() + 1) + "/" + today_date.getDate() + "/" +
today_date.getFullYear());
Date.getDate()
Availability
Flash Player 5.
Usage
my_date.getDate()
Parameters
None.
Returns
An integer.
Description
Method; returns the day of the month (an integer from 1 to 31) of the specified Date object
according to local time. Local time is determined by the operating system on which Flash Player
is running.

Table of Contents

Related product manuals