Flash Lite 2.x and 3.0 ActionScript Language Reference

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.

Parameters

date:Number - An integer from 1 to 31.

Returns

Number - An integer.

Example

The following example initially creates a new Date object, setting the date to May 15, 2004, and uses Date.setDate() to change the date to May 25, 2004:

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