Hi there, I am using the date class in flash as3, I was wondering how to
compare two date and return how may days left.


for instance: my target date is 10/18/2009(mm/dd/yyyy), I would like to
compare with the current date 10/13/2009, the script returns 5.

something like....

var localDate:Date = new Date();
var day:Number = localDate.getDay();
var month:Number = localDate.getMonth();
var year:Number = localDate.getFullYear();


var currentDate:Date = new Date ( year, month , day )
var targetDate:Date = new Date ( 2009 , 10 ,18 );


trace(currentDate - targetDate)


Thank You
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to