View | Details | Raw Unified | Return to bug 8251
Collapse All | Expand All

(-)a/Koha/Calendar.pm (-2 / +5 lines)
Lines 170-176 sub days_between { Link Here
170
    my $end_dt   = shift;
170
    my $end_dt   = shift;
171
171
172
    # start and end should not be closed days
172
    # start and end should not be closed days
173
    my $duration = $end_dt->delta_days($start_dt);
173
    my $duration = $end_dt->delta_days($start_dt);i
174
    # if borrower is not late, delta days must be negative
175
    if(DateTime->compare( $start_dt, $end_dt ) > -1){
176
        $duration->{'days'} = - $duration->{'days'};
177
    }
174
    $start_dt->truncate( to => 'days' );
178
    $start_dt->truncate( to => 'days' );
175
    $end_dt->truncate( to => 'days' );
179
    $end_dt->truncate( to => 'days' );
176
    while ( DateTime->compare( $start_dt, $end_dt ) == -1 ) {
180
    while ( DateTime->compare( $start_dt, $end_dt ) == -1 ) {
177
- 

Return to bug 8251