This was spurred by my desire to be able to write in RSpec something like: expect(a_datetime).to be_within 5.minutes of some_other_datetime
All that would be needed to make this and other such comparisons work (as far as I can tell) is to implement the 'minus' method such that subtracting two DateTimes returns a Duration. Seems like it might make a nice addition. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.
