From: Trans Date: 2005-03-25T01:29:49+09:00 Subject: Re: Ruby Facets 0.6.2 Francis Hwang wrote: > Thanks for that. Can I humbly suggest that Numeric#ago be changed to > Numeric#before? If we're trying to mimic English, you'd never say "10 > days ago yesterday" in English, but you would say "10 days before > yesterday". So instead of making people call > > 10.days.ago( Time.now - 1.day ) > > they could call > > 10.days.before( Time.now - 1.day ) > > instead. And if Time.yesterday and Time.tomorrow had been defined, you > could simply call > > 10.days.before Time.yesterday > > And maybe this would cause transitional issues, but it might be good to > redefine Numeric#ago to refer to a time relative to the current moment, > which is in line with what it means in English. > > yesterday = 1.day.ago > last_monday = 8.days.ago > > Similarly, Numeric#later could go the other way: > > tomorrow = 1.day.later > next_tuesday = 6.days.later > > And Numeric#after could add time to any arbitrary starting point: > > three_days_later = 2.days.after Time.tomorrow > > I'd submit patches for these, but they're all pretty easy. All done. And no transistional issues to speak-of. Expect them with the next release (Probably a few weeks from now). T.