30 day expiration date
Hi,
I'm trying to create a 30 day expiration date for an action.
Start by getting the date on a specific starting date.
var D1:Date = new date;
Add 30 days:
D1.date += 30;
Set up a getDate function:
var D2: date = new date;
How do you compare D1 and D2 as date (not numbers) to check if D2 is more than 30 days greater than D1? Will this work? For example, if today is May 8, then +=30 would be June 7. How to compare that if a date is gotten on June 9, and compared with a stored (SO, for example) May 8, that it is greater (then do something condition)?
if ( D2 > D1) {
//do something
}
Any help appreciated.
saratogacoach
