![MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference Download Page 483](http://html.mh-extra.com/html/macromedia/flash-8-actionscript-2-0-language/flash-8-actionscript-2-0-language_reference_687537483.webp)
Date
483
Example
The following example creates a new Date object and uses
getDay()
to determine the current
day 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);
getFullYear (Date.getFullYear method)
public getFullYear() : Number
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.
Availability:
ActionScript 1.0; Flash Player 5
Returns
Number
- An integer representing the year.
Example
The following example uses the constructor to create a Date object. The trace statement
shows the value returned by the
getFullYear()
method.
var my_date:Date = new Date();
trace(my_date.getYear()); // displays 104
trace(my_date.getFullYear()); // displays current year
getHours (Date.getHours method)
public getHours() : Number
Returns the hour (an integer from 0 to 23) 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 Player 5
Returns
Number
- An integer.
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...