millisecond:Number
milliseconds field of the specified Date object will not be modified.
Returns
- An integer.
Number
Example
The following example initially creates a new Date object, setting the time and date to
8:00:00 a.m. on May 15, 2004, and uses
a.m.:
var my_date:Date = new Date(2004,4,15,8,0,0);
trace(my_date.getUTCSeconds()); // output: 0
my_date.setUTCSeconds(45);
trace(my_date.getUTCSeconds()); // output: 45
setYear (Date.setYear method)
public setYear(year:Number) : Number
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.
Availability: ActionScript 1.0; Flash Player 5
Parameters
- A number that represents the year. If
year:Number
sets the year at 1900 +
setYear
Returns
- An integer.
Number
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);
[optional] - An integer from 0 to 999. If you omit this parameter, the
Date.setSeconds()
; otherwise, the year is the value of the
year
to change the time to 8:30:45
is an integer between 0 and 99,
year
parameter.
year
Date
503
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?