jherdman/javascript-relative-time-helpers — pull request #2 by Xion (2012-02-28 19:55:29+00:00)
Title: More formatting options

I have enhanced the formatter with two features:

* It is now possible to specify what time is considered as `now` when making the conversion to relative
* For dates that are within one week from `now`, using `smartDays` option will express them in terms of Today/Tomorrow/Yesterday/weekday and time, i.e. "Wednesday at 08:45:10" or "Tomorrow at 14:56:23" rather than "N days from now"

To do that, I changed `toRelativeTime` to accept an object but for compatibility, it's still possible to pass a number (which is now a `nowThreshold`).