Relative Date is a library for working with and generating relative date strings. It has a simple API and allows to calculate dates using human-readable form, such as “two hours ago” instead of “Mon Jan 5 17:24:33 GMT-0700 2011”.

The date class takes two date objects and returns a string describing the difference in time.

Sample

var relativeTime:String = RelativeDate.getRelativeDate(firstDate, secondDate);
var relativeTime:String = RelativeDate.getRelativeDateFromNow(someDate);
Misc . URL.