FRickReich/timeago — pull request #2 by orbanbotond (2012-10-11 11:29:51+00:00)
Title: Hi Frederik, I made it more ruby/rails friendly if you dont' mind... Please let me know if you keep the code and release a new gem of it.

The time thresholds are more easy to read.
It works directly on Time and ActiveSupport::TimeWithZone classes.

1.9.2p180 :001 > t = Time.now - 1.day
=> 2012-10-10 14:20:33 +0300
1.9.2p180 :002 > t.relative_time
=> "yesterday ago"
!! Incorrect !!

.9.2p180 :001 > t = Time.now - 1.day
=> 2012-10-10 14:23:27 +0300
1.9.2p180 :002 > t = t- 2.hours
=> 2012-10-10 12:23:27 +0300
1.9.2p180 :003 > t.relative_time
=> "yesterday"
1.9.2p180 :004 > t = t- 23.hours
=> 2012-10-09 13:23:27 +0300
1.9.2p180 :005 > t.relative_time
=> "2 days ago"

1.9.2p180 :008 > Comment.first.created_at.relative_time
Comment Load (0.7ms) SELECT "comments".* FROM "comments" LIMIT 1
=> "4 months ago"
1.9.2p180 :009 > Comment.last.created_at.relative_time
Comment Load (1.3ms) SELECT "comments".* FROM "comments" ORDER BY "comments"."id" DESC LIMIT 1
=> "2 weeks ago"