Here is a little example of how to return a date a set number of days from any given date in ActionScript 3 (Flex, AIR).
I used the example to return a set number of days since one of our issues launched, by sending the function the number of days and the starting date.
/* This is a public static function so it can be called from my
utility class of useful converts and such! */
public static function returnDateXDaysFromY( x:Number , y:Date ):Date
{
var xDaysFromY:Date = new Date(); // Date to return
// I have removed a call to a function to set the time to zero, you can get caught out with summer time etc
x = ((((x * 24)* 60) * 60) * 1000); // Turn days to miliseconds
xDaysFromY.setTime( x + y.getTime() );
return xDaysFromY;
}
Hopefully someone else out there will find this handy :)