[Koha-bugs] [Bug 8486] Critical error in Koha::Calendar::days_between calculation

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Sep 3 12:53:03 CEST 2012


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

Koha Team Lyon 3 <koha at univ-lyon3.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |koha at univ-lyon3.fr

--- Comment #15 from Koha Team Lyon 3 <koha at univ-lyon3.fr> ---
May be I missed something  (I was away for a long time) but at first sight, I
suspect that this patch leaves bug 8251 unsolved ("Patrons systematically
debarred at checkin") : in days_between subroutine, delta_days function returns
always a positive number (see Description of bug 8251). If so
so it would be necessary to add the following condition :
if(DateTime->compare( $start_dt, $end_dt ) > -1){
    $days = $duration->inverse;
} else {
for (my $dt = $start_dt->clone();
       $dt <= $end_dt;
       $dt->add(days => 1)
    ) {
        if ($self->is_holiday($dt)) {
            $days--;
         }
    }
}

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


More information about the Koha-bugs mailing list