Is it correct to do this? if @date_a > @date_b puts 'hi' end
on 2009-02-13 20:42
on 2009-02-13 20:54
On 13 Feb 2009, at 18:42, John S. wrote: > > Is it correct to do this? > if @date_a > @date_b > puts 'hi' > end assuming those are both instances of Date, (or Time etc.) then yes. Ruby won't let you compare an instance of Date with a Time instance, and equally funny things will happen if either (or both) of those are string representations of the dates. Fred
on 2009-02-13 21:42
Thanks Fred. Those ones are the updated_at rows of two different tables.
on 2009-02-14 09:24
I think you'll be good to go with that one. On Feb 13, 1:42 pm, John S. <firstname.lastname@example.org>