MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 264

Actionscript language reference
Table of Contents

Advertisement

Example
The following example creates a new Date object and uses
of the week
:
var dayOfWeek_array:Array = new Array("Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday");
var today_date:Date = new Date();
var day_str:String = dayOfWeek_array[today_date.getDay()];
trace("Today is "+day_str);
Date.getFullYear()
Availability
Flash Player 5.
Usage
my_date.getFullYear() : Number
Parameters
None.
Returns
An integer representing the year.
Description
Method; returns the full year (a four-digit number, such as 2000) of the specified Date object,
according to local time. Local time is determined by the operating system on which Flash Player is
running.
Example
The following example uses the constructor to create a Date object and send the value returned by
the
getFullYear()
var my_date:Date = new Date();
trace(my_date.getYear()); // displays 104
trace(my_date.getFullYear()); // displays current year
Date.getHours()
Availability
Flash Player 5.
Usage
my_date.getHours() : Number
Parameters
None.
264
Chapter 6: ActionScript Core Classes
method to the log file:
to determine the current day
getDay()

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents