On 13 Feb 2009, at 18:42, John Smith 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
>
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to