Lines 171-176
sub days_between {
Link Here
|
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); |
|
|
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 |
- |
|
|