if ($sort_method eq "week") { $record_day = $this_record[0]; $record_day =~ s/(\w*?) .*/$1/so; if ($this_day eq "Monday") { if (($time - $this_record[2]) <= 604800) and ($record_day eq $this_day)) { $display_index{$key} = $this_record[2]; } } if ($this_day eq "Tuesday") { if (($time - $this_record[2]) <= (604800 * 2)) { if (($record_day eq "Monday") or ($record_day eq "Tuesday")) { $display_index{$key} = $this_record[2]; } } } if ($this_day eq "Wednesday") { if (($time - $this_record[2]) <= (604800 * 3)) { if (($record_day eq "Monday") or ($record_day eq "Tuesday") or ($record_day eq "Wednesday")) { $display_index{$key} = $this_record[2]; } } } if ($this_day eq "Thursday") { if (($time - $this_record[2]) <= (604800 * 4)) { if (($record_day eq "Monday") or ($record_day eq "Tuesday") or ($record_day eq "Wednesday") or ($record_day eq "Thursday")) { $display_index{$key} = $this_record[2]; } } } if ($this_day eq "Friday") { if (($time - $this_record[2]) <= (604800 * 5)) { if (($record_day eq "Monday") or ($record_day eq "Tuesday") or ($record_day eq "Wednesday") or ($record_day eq "Thursday") or ($record_day eq "Friday")) { $display_index{$key} = $this_record[2]; } } } if ($this_day eq "Saturday") { if (($time - $this_record[2]) <= (604800 * 6)) { if (($record_day eq "Monday") or ($record_day eq "Tuesday") or ($record_day eq "Wednesday") or ($record_day eq "Thursday") or ($record_day eq "Friday") or ($record_day eq "Saturday")) { $display_index{$key} = $this_record[2]; } } } if ($this_day eq "Sunday") { if (($time - $this_record[2]) <= (604800 * 7)) { $display_index{$key} = $this_record[2]; } } }