[Koha-bugs] [Bug 14918] Remove C4::Dates from circ/pendingreserves.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Oct 8 11:15:11 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14918

--- Comment #7 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Marcel de Rooy from comment #6)
> -    my $pastdate= sprintf("%-04.4d-%-02.2d-%02.2d", Add_Delta_YMD($year,
> $month, $day, 0, 0,
> -C4::Context->preference('HoldsToPullStartDate')||TWO_DAYS_AGO ));
> -    $startdate = format_date($pastdate);
> +    $startdate = $today - DateTime::Duration->new( days =>
> C4::Context->preference('HoldsToPullStartDate') || 2 );
> 
> 
> Replacing a constant by a hardcoded value is not an improvement.

A constant named TWO_DAYS_AGO does not make really sense...
And is only used once.
Feel free to use TWO_DAYS instead, if you prefer.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list