Possible Duplicate:
How do you do relative time in Rails?
I want to display the datetime like this:
30 seconds ago
1 hour ago
9 hours ago
2 days ago
1 year ago
..
Is this built in or should I write my own function to do this?
http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#method-i-distance_of_time_in_words
精彩评论