On onsdag, jun 18, 2003, at 02:18 Europe/Stockholm, Lee Collings wrote:
> 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))
> {
> Print "it is a valid date"
> }
> Print "it isn't a valid date"
>
1) Don't capitalize print
2) If start_pub is April 10 2003 this test will fail for example on
July 1 2003 since
$start_pub_day ge $day
will be false. Just concatenating strings to "YYYYMMDD" will work for
numeric comparisons.
Christian Huldt
Thread Previous