to use this gem, just require and run it, like this:
require 'timeago' time = Time.now - 60 TimeAgo.readable(time)
and it should output
one minute ago
require 'timeago' time = Time.now - 13250 TimeAgo.readable(time)
this should output
3 hours ago
this can go up to 5 years ago, after that it will change to the exact date.
-
build ability to change max - time
-
add seconds
-
add language options?
Copyright © 2012 Frederik Reich.