Getday (Date.getday Method); Getfullyear (Date.getfullyear Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example creates a new Date object and concatenates the returned values of
,
Date.getMonth()
Date.getDate()
var today_date:Date = new Date();
var date_str:String = (today_date.getDate()+"/
"+(today_date.getMonth()+1)+"/"+today_date.getFullYear());
trace(date_str); // displays current date in United States date format
See also
getMonth (Date.getMonth method)

getDay (Date.getDay method)

public getDay() : Number
Returns the day of the week (0 for Sunday, 1 for Monday, and so on) 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
- An integer representing the day of the week.
Number
Example
The following example creates a new Date object and uses
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 Lite 2.0
332
ActionScript classes
, and
Date.getFullYear():
,
getFullYear (Date.getFullYear method)
getDay()
to determine the current

Advertisement

Table of Contents
loading

Table of Contents