prezjordan/uptodate — pull request #3 by andyhmltn (2013-07-10 09:14:52+00:00)
Title: Improved the time_ago_in_words function

I've shortened the time_ago_in_words function and it's a lot easier to add a new time period. For instance, if you want to add something like 'decades' (if you're planning on a long term javascript app I suppose?) just add 'decade' to `periods` and `10` (The amount the last value in `periods` (in this case years) it takes to make a decade) and you're done!

Credit to this awesome PHP function: http://css-tricks.com/snippets/php/time-ago-function/

Just needed to be converted to JS :shipit: