EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Getdate (Date.getdate Method)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 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...
Date 331
hour:Number [optional] - An integer from 0 (midnight) to 23 (11 p.m.).
minute:Number [optional] - An integer from 0 to 59.
second:Number [optional] - An integer from 0 to 59.
millisecond:Number [optional] - An integer from 0 to 999 of milliseconds.
Example
The following example retrieves the current date and time:
var now_date:Date = new Date();
The following example creates a new Date object for Mary's birthday, August 12, 1974
(because the month parameter is zero-based, the example uses 7 for the month, not 8):
var maryBirthday:Date = new Date (74, 7, 12);
The following example creates a new Date object and concatenates the returned values of
Date.getMonth(), Date.getDate(), and Date.getFullYear():
var today_date:Date = new Date();
var date_str:String = ((today_date.getMonth()+1)+"/
"+today_date.getDate()+"/"+today_date.getFullYear());
trace(date_str); // displays current date in United States date format
See also
getMonth (Date.getMonth method), getDate (Date.getDate method), getFullYear
(Date.getFullYear method)
getDate (Date.getDate method)
public getDate() : Number
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.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
Number - An integer.

Table of Contents

Related product manuals