At 5:18 PM -0700 6/17/03, Lee Collings wrote: >I'm wondering if anyone can solve this riddle for me. > >I am trying to compare a couple of dates using the following > >if (($start_pub_year ge $yr && $end_pub_year le $yr) && > ($start_pub_mon ge $mo && $end_pub_mon le $mo) && > ($start_pub_day ge $day && $end_pub_day le $day)) '&&' is probably the wrong operator here. Use 'and' instead if (($start_pub_year ge $yr and $end_pub_year le $yr) and ($start_pub_mon ge $mo and $end_pub_mon le $mo) and ($start_pub_day ge $day and $end_pub_day le $day)) I don't remember whether 'ge' is the right choice instead of '>=' either. I wouldn't use it myself, but that doesn't mean it's wrong. And as Christian Huldt said, you need to make sure you know what you're comparing. -Jeff LowreyThread Previous | Thread Next