Your code compares a date and a string. Try comparing two dates. If you don't know how to make a new date, try google or
BTW <=> is probably not what you want to compare with. It always returns a number, and numbers are true, so your if statement doesn't make much sense.
irb(main):010:0> 1 <=> 2
irb(main):011:0> 1 <=> 0
irb(main):012:0> 1 <=> 1
-- Elliot Temple
On Aug 29, 2006, at 3:53 PM, Parv G. wrote:
This might be simple question for some you so.
I'm trying to compare today's dates with another date, which is in the
format of mm/dd/yy. Can somebody help?
I tried the following, but it doesn't work:
if(Date.today <=> "09/29/06") or (Date.today <=> "092906")