Thought I''d post this as it might be useful to someone else as well. I was looking for a way to convert the difference in duration between two times, in seconds, to a friendly, human-readable form such as "2 weeks, 3 days, 1 hour and 11 minutes" similar to the way distance_of_time_in_words() does for past times in DateHelper. I couldn''t find one already made so I wrote my own: http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/ I think this sort of thing might be useful to others if included in DateHelper. Thoughts? Cheers Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thought I''d post this as it might be useful to someone else as well. I was looking for a way to convert the difference in duration between two times, in seconds, to a friendly, human-readable form such as "2 weeks, 3 days, 1 hour and 11 minutes" similar to the way distance_of_time_in_words() does for past times in DateHelper. I couldn''t find one already made so I wrote my own: http://www.postal-code.com/binarycode/2007/04/04/english-friendly-timespan/ I think this sort of thing might be useful to others if included in DateHelper. Thoughts? Cheers Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---