ActionScript 3.0 + Calculate timespan between two dates?
In ActionScript 3.0, is there an automatic way to calculate the number of days, hours, minutes and seconds between two specified dates? Basicly, what I need is the ActionScript equivalent of the .NET Timespan class. Any idea? I created an ActionScript TimeSpan class with a similar API to System.TimeSpan to fill that void, but there are differences due to the lack of operator overloading. You can use it like so: TimeSpan.fromDates(later, earlier).totalDays; Below is the code for the class (sorry for the big post - I won't include the Unit Tests ;) /** * Represents an interval of time */ public