@@ -, +, @@ --too_old acts a year too early years + 1 day --- Koha/Patrons.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/Koha/Patrons.pm +++ a/Koha/Patrons.pm @@ -391,8 +391,8 @@ sub search_patrons_to_update_category { $search_params->{dateofbirth}{'>'} = $dtf->format_datetime( $date_after ); } if( $cat_from->upperagelimit && $params->{too_old} ) { - my $date_before = dt_from_string()->subtract( years => $cat_from->upperagelimit); - $search_params->{dateofbirth}{'<'} = $dtf->format_datetime( $date_before ); + my $date_before = dt_from_string()->subtract( years => ( $cat_from->upperagelimit + 1 ) ); + $search_params->{dateofbirth}{'<='} = $date_before->strftime("%Y-%m-%d"); } } if ($params->{fine_min} || $params->{fine_max}) { --