Hi everyone. Does anybody know a good plugin for displaying a human readable time. I like the ones on github. Django also has this built in, but I can not find it for rails. Can anybody tell me a good plugin for this? Thank you for your help. Kind regards, -- http://twitter.com/scrum8 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 March 2010 09:19, Joshua Partogi <joshua.partogi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi everyone. > > Does anybody know a good plugin for displaying a human readable time. > I like the ones on github. Django also has this built in, but I can > not find it for rails. Can anybody tell me a good plugin for this?Could you be a bit more explicit about exactly what you want to see? strftime works for me but perhaps I misunderstand your requirement. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, 07 Mar 2010 17:46:40 +0800, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 7 March 2010 09:19, Joshua Partogi <joshua.partogi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hi everyone. >> >> Does anybody know a good plugin for displaying a human readable time. >> I like the ones on github. Django also has this built in, but I can >> not find it for rails. Can anybody tell me a good plugin for this? > > Could you be a bit more explicit about exactly what you want to see? > strftime works for me but perhaps I misunderstand your requirement. > > Colin >I''m assuming the OP means something like this - http://apidock.com/rails/ActionView/Helpers/DateHelper/time_ago_in_words Simon -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Simon, You got that right. That is exactly what I am looking for. I should have looked in ActionPack before asking next time. Thanks for your help. Kind regards, On Mar 7, 8:50 pm, "Simon Macneall" <macne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, 07 Mar 2010 17:46:40 +0800, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: > > > On 7 March 2010 09:19, Joshua Partogi <joshua.part...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hi everyone. > > >> Does anybody know a good plugin for displaying a human readable time. > >> I like the ones on github. Django also has this built in, but I can > >> not find it for rails. Can anybody tell me a good plugin for this? > > > Could you be a bit more explicit about exactly what you want to see? > > strftime works for me but perhaps I misunderstand your requirement. > > > Colin > > I''m assuming the OP means something like this - http://apidock.com/rails/ActionView/Helpers/DateHelper/time_ago_in_words > > Simon-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''ve written a gem for this that''s also context-sensitive regarding today''s date, so it knows whether a post occurred this Monday or last Monday, for instance. It extends ActiveSupport::TimeWithZone, so it works with your ActiveRecord objects out of the box. https://github.com/brettshollenberger/hublot Cheers, Brett On Sunday, March 7, 2010 4:19:34 AM UTC-5, Joshua Partogi wrote:> > Hi everyone. > > Does anybody know a good plugin for displaying a human readable time. > I like the ones on github. Django also has this built in, but I can > not find it for rails. Can anybody tell me a good plugin for this? > > Thank you for your help. > > > Kind regards, > > -- > http://twitter.com/scrum8 > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2f39ea08-5857-4f77-8d70-2569c88d32c9%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.