I am trying to compare to date and month in here. I am trying to filter the date which is bigger than today’s date, It will be printed, otherwise not. When I am trying to play around, it does something, but it does either one, print them all or none. Please help me how to set the date filter.

 

-----

 

foreach $kapal1 (@raw_data1)

{

      chop($kapal1);

      ($vessel1,$voy1,$eta11,$etd11,$eta12,$etd12,$time1)=split(/\,/,$kapal1);

      $date_etd = substr($etd11,0,3);

      $month_etd = lc(substr($etd11,3,5));

# I am trying to compare the etd date and month and today’s date in here, If the etd’s date is bigger than today’s it will print it.

      if (($MON{$month_etd} >= $MON{$vmonth}) && ($date_etd >= $vday)) {

            print "<tr>";

      print "<td align=left width=160>",$vessel1,"</td>\n";

      print "<td align=center width=20>",$voy1,"</td>\n";

      print "<td align=center width=51>",$eta11,"</td>\n";

      print "<td align=center width=51>",$etd11,"</td>\n";

      print "<td align=center width=51>",$eta12,"</td>\n";

      print "<td align=center width=51>",$etd12,"</td>\n";

      print "<td align=center width=140>",$time1,"</td>\n";

      print "</tr>\n";

            print $date_etd.$month_etd,"<br>";

      }

      else { continue the loop }

}

 

 

Reply via email to