Calculating minutes, hours or days since now


#1

Hi,

Is there an easy (inbuilt?) way to create the following string formats
from dates:

10 minutes ago (for a date that is 10 mins old)
59 minutes ago
1 hours ago
23 hours ago
4 days ago

etc…

Thanks,
GiantCranes


#2

Is there an easy (inbuilt?) way to create the following string formats
from dates:

time_ago_in_words

http://api.rubyonrails.com/classes/ActionView/Helpers/DateHelper.html#M000572


#3

Philip H. wrote:

Is there an easy (inbuilt?) way to create the following string formats
from dates:

time_ago_in_words

http://api.rubyonrails.com/classes/ActionView/Helpers/DateHelper.html#M000572

Wow, that is great. Cheers.