pragmaticly/smart-time-ago — pull request #24 by rpocklin (2013-09-23 14:11:43+00:00)
Title: Make prefix/suffix be included conditionally instead of always.

__Motivation__
My use case is in a real-time app with expiring offers, but after ending I want to show the end time as '1 minute ago' or 'in less than 1 minute' when end time is in the future. The current codebase was always including the prefix and suffix which didn't make sense 'in less than 1 minute ago' :P This PR fixes this behaviour.

Looking at the repo history the code was once more conditional and this was changed to always include it, not sure why?

I've been able to simplify the tests, and added 2 more at the bottom to prove the formatting of the resulting text is correct.