/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static function getDaysBetweenDates(date1:Date,date2:Date):int { var one_day:Number = 1000 * 60 * 60 * 24 var date1_ms:Number = date1.getTime(); var date2_ms:Number = date2.getTime(); var difference_ms:Number = Math.abs(date1_ms - date2_ms) return Math.round(difference_ms/one_day); }