Previous patch broke date comparison that sets
overdue flag - now that ISO-formatted date
strings are being compared, must use "it"
instead of "<".
"2009-01-02" lt "2009-01-08" is true
"2009-01-02" < "2009-01-08" is *false*
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
my $today = C4::Dates->new->output('iso');
foreach (@$data) {
$_->{date_due} or next;
- ($_->{date_due} < $today) and $_->{overdue} = 1;
+ ($_->{date_due} lt $today) and $_->{overdue} = 1;
}
return $data;
}