azer/relative-date — pull request #7 by BigglesZX (2013-03-28 12:42:53+00:00)
Title: Added support for future dates

I love the simplicity of this library but needed something that would work with future dates too, so I added support for it. Hope this helps anyone else wanting the same thing!

Commit message with a little more detail:

> A quick adjustment to allow the processing of future dates, which previously always returned "just now".

> The delta is now checked and if negative, a flag is set that adjusts the text used to describe the relative dates (generally changing "ago" to "from now").

> For dates less than 1.5 * MINUTE in the future, the text is "in a moment".