a lot of bloggy sites display time as this post was made X hours / X days / X months ago. this is so popular I''m sure RoR has a built in lib to do it, but I can''t figure it out, searching google and the docs. there''s an ago function, but it returns a Time. I need like the reverse. Is there one? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 11, 2007, at 12:32 PM, rubynuby wrote:> > a lot of bloggy sites display time as this post was made X hours / X > days / X months ago. this is so popular I''m sure RoR has a built in > lib to do it, but I can''t figure it out, searching google and the > docs. there''s an ago function, but it returns a Time. I need like > the reverse. Is there one?time_ago_in_words http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M000994 -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org
On Dec 11, 2007, at 11:32 AM, rubynuby wrote:> > a lot of bloggy sites display time as this post was made X hours / X > days / X months ago. this is so popular I''m sure RoR has a built in > lib to do it, but I can''t figure it out, searching google and the > docs. there''s an ago function, but it returns a Time. I need like > the reverse. Is there one?distance_of_time_in_words
thank you :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---