MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 267

Actionscript language reference
Table of Contents

Advertisement

Description
Method; returns the month (0 for January, 1 for February, 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.
Example
The following example uses the constructor to create a Date object based on the current time and
uses the
getMonth()
var my_date:Date = new Date();
trace(my_date.getMonth());
The following example uses the constructor to create a Date object based on the current time and
uses the
getMonth()
name of the month.
var my_date:Date = new Date();
trace(my_date.getMonth());
trace(getMonthAsString(my_date.getMonth()));
function getMonthAsString(month:Number):String {
var monthNames_array:Array = new Array("January", "February", "March",
"April", "May", "June", "July", "August", "September", "October",
"November", "December");
return monthNames_array[month];
}
Date.getSeconds()
Availability
Flash Player 5.
Usage
my_date.getSeconds() : Number
Parameters
None.
Returns
An integer.
Description
Method; returns the seconds (an integer from 0 to 59) 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 based on the current time and
uses the
getSeconds()
var my_date:Date = new Date();
trace(my_date.getSeconds());
method to return the month value from that object:
method to display the current month as a numeric value, and display the
method to return the seconds value from that object:
Date.getSeconds()
267

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