Pass negative values to these methods. Date starts with 0, January, and subtracts. Thus, a value of –1 is the same as saying December of the previous year. : Date « Development « Flash / Flex / ActionScript
Pass negative values to these methods. Date starts with 0, January, and subtracts. Thus, a value of –1 is the same as saying December of the previous year.
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.setMonth(-1); // December 23, 2002
trace(dSometime);
}
}
}