MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 284

Actionscript language reference
Table of Contents

Advertisement

my_date.setUTCSeconds(45);
trace(my_date.getUTCSeconds()); // output: 45
Date.setYear()
Availability
Flash Player 5.
Usage
my_date.setYear(year:Number) : Number
Parameters
A number that represents the year. If
year
year at 1900 +
year
Returns
An integer.
Description
Method; sets the year for the specified Date object in local time and returns the new time
in milliseconds. Local time is determined by the operating system on which Flash Player
is running.
Example
The following example creates a new Date object with the date set to May 25, 2004, uses
to change the year to 1999, and changes the year to 2003:
setYear()
var my_date:Date = new Date(2004,4,25);
trace(my_date.getYear()); // output: 104
trace(my_date.getFullYear()); // output: 2004
my_date.setYear(99);
trace(my_date.getYear()); // output: 99
trace(my_date.getFullYear()); // output: 1999
my_date.setYear(2003);
trace(my_date.getYear()); // output: 103
trace(my_date.getFullYear()); // output: 2003
Date.toString()
Availability
Flash Player 5.
Usage
my_date.toString() : String
Parameters
None.
284
Chapter 6: ActionScript Core Classes
; otherwise, the year is the value of the
is an integer between 0–99,
year
parameter.
year
sets the
setYear

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents