Setting the Date: use the setDate() and setUTCDate() methods to set the day of the month for a Date object. : Date « Development « Flash / Flex / ActionScript
Setting the Date: use the setDate() and setUTCDate() methods to set the day of the month for a Date object.
package{ import flash.display.Sprite;
public class Main extends Sprite{ public function Main(){
var dSometime:Date = new Date(2003, 5, 23); // June 23, 2003
dSometime.setDate(23);
var dSometime:Date = new Date(3433, 1, 8);
dSometime.setDate(29);
var dSometime:Date = new Date(3433, 1, 8);
dSometime.setDate(-1);
dSometime.setMonth(-1);