Recently a lot of people I''ve spoken with have expressed that distance_of_time_in_words sucks for accuracy, providing values such as "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 minutes and 42 seconds" is "more appropriate". To fix this, I''ve written a plugin: http://github.com/radar/dotiw. I''m thinking that this should be in Rails core as it is a vast improvement over what currently exists, but I don''t want to put the effort into a patch that''s just going to be rejected, as per usual. Who else would find this useful? -- Ryan Bigg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On Fri, Aug 7, 2009 at 5:44 PM, Ryan Bigg (Radar)<radarlistener@gmail.com> wrote:> Recently a lot of people I''ve spoken with have expressed that > distance_of_time_in_words sucks for accuracy, providing values such as > "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 minutes and 42 > seconds" is "more appropriate". To fix this, I''ve written a plugin: > http://github.com/radar/dotiw. I''m thinking that this should be in Rails > core as it is a vast improvement over what currently exists, but I don''t > want to put the effort into a patch that''s just going to be rejected, as per > usual. > Who else would find this useful?The whole purpose of the existing method is to provide an approximate value, if that''s not what you''re looking for then you shouldn''t be calling that method :) Given that your plugin is completely stand alone and doesn''t need to override anything messy to keep functioning, I don''t think we need to make the change unless millions of people are clamouring for it. Not to pre-judge but this is the first time I''ve heard this asked for, so I''m thinking we''ll be best off leaving things as they are.> -- > Ryan Bigg > > > >-- Cheers Koz
I wouldn''t mind "about 2 and a half years" for the example in Ryan''s original, For the record, I can''t think of any time I''d want "2 years, 5 months, 3 days, 4 hours, 6 minutes and 42 seconds" - sorry. On Aug 6, 2009, at 10:48 PM, Michael Koziarski wrote:> > On Fri, Aug 7, 2009 at 5:44 PM, Ryan Bigg > (Radar)<radarlistener@gmail.com> wrote: >> Recently a lot of people I''ve spoken with have expressed that >> distance_of_time_in_words sucks for accuracy, providing values such >> as >> "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 >> minutes and 42 >> seconds" is "more appropriate". To fix this, I''ve written a plugin: >> http://github.com/radar/dotiw. I''m thinking that this should be in >> Rails >> core as it is a vast improvement over what currently exists, but I >> don''t >> want to put the effort into a patch that''s just going to be >> rejected, as per >> usual. >> Who else would find this useful? > > The whole purpose of the existing method is to provide an approximate > value, if that''s not what you''re looking for then you shouldn''t be > calling that method :) > > Given that your plugin is completely stand alone and doesn''t need to > override anything messy to keep functioning, I don''t think we need to > make the change unless millions of people are clamouring for it. Not > to pre-judge but this is the first time I''ve heard this asked for, so > I''m thinking we''ll be best off leaving things as they are. > >> -- >> Ryan Bigg >> >>> >> > > > > -- > Cheers > > Koz > > >
This is why I gave you :except options, so you can get 2 years, 6 months, for example. 2009/8/7 Jason King <smathy.werp@gmail.com>> > I wouldn''t mind "about 2 and a half years" for the example in Ryan''s > original, For the record, I can''t think of any time I''d want "2 > years, 5 months, 3 days, 4 hours, 6 minutes and 42 seconds" - sorry. > > > On Aug 6, 2009, at 10:48 PM, Michael Koziarski wrote: > > > > > On Fri, Aug 7, 2009 at 5:44 PM, Ryan Bigg > > (Radar)<radarlistener@gmail.com> wrote: > >> Recently a lot of people I''ve spoken with have expressed that > >> distance_of_time_in_words sucks for accuracy, providing values such > >> as > >> "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 > >> minutes and 42 > >> seconds" is "more appropriate". To fix this, I''ve written a plugin: > >> http://github.com/radar/dotiw. I''m thinking that this should be in > >> Rails > >> core as it is a vast improvement over what currently exists, but I > >> don''t > >> want to put the effort into a patch that''s just going to be > >> rejected, as per > >> usual. > >> Who else would find this useful? > > > > The whole purpose of the existing method is to provide an approximate > > value, if that''s not what you''re looking for then you shouldn''t be > > calling that method :) > > > > Given that your plugin is completely stand alone and doesn''t need to > > override anything messy to keep functioning, I don''t think we need to > > make the change unless millions of people are clamouring for it. Not > > to pre-judge but this is the first time I''ve heard this asked for, so > > I''m thinking we''ll be best off leaving things as they are. > > > >> -- > >> Ryan Bigg > >> > >>> > >> > > > > > > > > -- > > Cheers > > > > Koz > > > > > > > > > >-- Ryan Bigg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Oh yeah, and if a value is 0 it won''t show it either. 2009/8/7 Ryan Bigg (Radar) <radarlistener@gmail.com>> This is why I gave you :except options, so you can get 2 years, 6 months, > for example. > > 2009/8/7 Jason King <smathy.werp@gmail.com> > > >> I wouldn''t mind "about 2 and a half years" for the example in Ryan''s >> original, For the record, I can''t think of any time I''d want "2 >> years, 5 months, 3 days, 4 hours, 6 minutes and 42 seconds" - sorry. >> >> >> On Aug 6, 2009, at 10:48 PM, Michael Koziarski wrote: >> >> > >> > On Fri, Aug 7, 2009 at 5:44 PM, Ryan Bigg >> > (Radar)<radarlistener@gmail.com> wrote: >> >> Recently a lot of people I''ve spoken with have expressed that >> >> distance_of_time_in_words sucks for accuracy, providing values such >> >> as >> >> "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 >> >> minutes and 42 >> >> seconds" is "more appropriate". To fix this, I''ve written a plugin: >> >> http://github.com/radar/dotiw. I''m thinking that this should be in >> >> Rails >> >> core as it is a vast improvement over what currently exists, but I >> >> don''t >> >> want to put the effort into a patch that''s just going to be >> >> rejected, as per >> >> usual. >> >> Who else would find this useful? >> > >> > The whole purpose of the existing method is to provide an approximate >> > value, if that''s not what you''re looking for then you shouldn''t be >> > calling that method :) >> > >> > Given that your plugin is completely stand alone and doesn''t need to >> > override anything messy to keep functioning, I don''t think we need to >> > make the change unless millions of people are clamouring for it. Not >> > to pre-judge but this is the first time I''ve heard this asked for, so >> > I''m thinking we''ll be best off leaving things as they are. >> > >> >> -- >> >> Ryan Bigg >> >> >> >>> >> >> >> > >> > >> > >> > -- >> > Cheers >> > >> > Koz >> > >> > > >> >> >> >> >> > > > -- > Ryan Bigg >-- Ryan Bigg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
lol @ "as per usual" How jaded we''ve all become. :) I would use this. I''ve built things like this a few times, and there''s always the case where I screw up and get "1 hours" (wrong pluralization) or "80 seconds" (instead of 1 minute 20 sec). Be nice to standardize going forward. On Fri, Aug 7, 2009 at 1:48 AM, Michael Koziarski <michael@koziarski.com>wrote:> > On Fri, Aug 7, 2009 at 5:44 PM, Ryan Bigg > (Radar)<radarlistener@gmail.com> wrote: > > Recently a lot of people I''ve spoken with have expressed that > > distance_of_time_in_words sucks for accuracy, providing values such as > > "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 minutes and > 42 > > seconds" is "more appropriate". To fix this, I''ve written a plugin: > > http://github.com/radar/dotiw. I''m thinking that this should be in Rails > > core as it is a vast improvement over what currently exists, but I don''t > > want to put the effort into a patch that''s just going to be rejected, as > per > > usual. > > Who else would find this useful? > > The whole purpose of the existing method is to provide an approximate > value, if that''s not what you''re looking for then you shouldn''t be > calling that method :) > > Given that your plugin is completely stand alone and doesn''t need to > override anything messy to keep functioning, I don''t think we need to > make the change unless millions of people are clamouring for it. Not > to pre-judge but this is the first time I''ve heard this asked for, so > I''m thinking we''ll be best off leaving things as they are. > > > -- > > Ryan Bigg > > > > > > > > > > > -- > Cheers > > Koz > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I just recently wrote my own to get exact results for everything minus the seconds for timing purposes in some logging. So your plugin with :except would have likely done the trick for me. On Fri, Aug 7, 2009 at 8:00 AM, Ryan Angilly<angilly@gmail.com> wrote:> lol @ "as per usual" How jaded we''ve all become. :) > > I would use this. I''ve built things like this a few times, and there''s > always the case where I screw up and get "1 hours" (wrong pluralization) or > "80 seconds" (instead of 1 minute 20 sec). Be nice to standardize going > forward. > > > On Fri, Aug 7, 2009 at 1:48 AM, Michael Koziarski <michael@koziarski.com> > wrote: >> >> On Fri, Aug 7, 2009 at 5:44 PM, Ryan Bigg >> (Radar)<radarlistener@gmail.com> wrote: >> > Recently a lot of people I''ve spoken with have expressed that >> > distance_of_time_in_words sucks for accuracy, providing values such as >> > "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 minutes and >> > 42 >> > seconds" is "more appropriate". To fix this, I''ve written a plugin: >> > http://github.com/radar/dotiw. I''m thinking that this should be in Rails >> > core as it is a vast improvement over what currently exists, but I don''t >> > want to put the effort into a patch that''s just going to be rejected, as >> > per >> > usual. >> > Who else would find this useful? >> >> The whole purpose of the existing method is to provide an approximate >> value, if that''s not what you''re looking for then you shouldn''t be >> calling that method :) >> >> Given that your plugin is completely stand alone and doesn''t need to >> override anything messy to keep functioning, I don''t think we need to >> make the change unless millions of people are clamouring for it. Not >> to pre-judge but this is the first time I''ve heard this asked for, so >> I''m thinking we''ll be best off leaving things as they are. >> >> > -- >> > Ryan Bigg >> > >> > > >> > >> >> >> >> -- >> Cheers >> >> Koz >> >> > > > > >
I''d be interested On Aug 7, 12:44 am, "Ryan Bigg (Radar)" <radarliste...@gmail.com> wrote:> Recently a lot of people I''ve spoken with have expressed that > distance_of_time_in_words sucks for accuracy, providing values such as > "about 2 years" where "2 years, 5 months, 3 days, 4 hours, 6 minutes and 42 > seconds" is "more appropriate". To fix this, I''ve written a plugin:http://github.com/radar/dotiw. I''m thinking that this should be in Rails > core as it is a vast improvement over what currently exists, but I don''t > want to put the effort into a patch that''s just going to be rejected, as per > usual. > Who else would find this useful? > > -- > Ryan Bigg