Setdate (Date.setdate 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

Returns
- An integer.
Number
Example
The following example creates a Date object with the month and year set to May 2004. The
method returns 104, and
Date.getYear()
var today_date:Date = new Date(2004,4);
trace(today_date.getYear()); // output: 104
trace(today_date.getFullYear()); // output: 2004
See also
getFullYear (Date.getFullYear method)

setDate (Date.setDate method)

public setDate(date:Number) : Number
Sets the day of the month for the specified Date object, according to 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 Lite 2.0
Parameters
- An integer from 1 to 31.
date:Number
Returns
- An integer.
Number
Example
The following example initially creates a new Date object, setting the date to May 15, 2004,
and uses
Date.setDate()
var today_date:Date = new Date(2004,4,15);
trace(today_date.getDate()); //displays 15
today_date.setDate(25);
trace(today_date.getDate()); //displays 25
344
ActionScript classes
Date.getFullYear()
to change the date to May 25, 2004:
returns 2004:

Advertisement

Table of Contents
loading

Table of Contents