Lines 147-153
sub is_holiday {
Link Here
|
147 |
if ( $self->{weekly_closed_days}->[$dow] == 1 ) { |
147 |
if ( $self->{weekly_closed_days}->[$dow] == 1 ) { |
148 |
return 1; |
148 |
return 1; |
149 |
} |
149 |
} |
150 |
$dt->truncate( to => 'days' ); |
150 |
$dt->truncate( to => 'day' ); |
151 |
my $day = $dt->day; |
151 |
my $day = $dt->day; |
152 |
my $month = $dt->month; |
152 |
my $month = $dt->month; |
153 |
if ( exists $self->{day_month_closed_days}->{$day}->{$month} ) { |
153 |
if ( exists $self->{day_month_closed_days}->{$day}->{$month} ) { |
Lines 189-196
sub days_between {
Link Here
|
189 |
sub hours_between { |
189 |
sub hours_between { |
190 |
my ($self, $start_dt, $end_dt) = @_; |
190 |
my ($self, $start_dt, $end_dt) = @_; |
191 |
my $duration = $end_dt->delta_ms($start_dt); |
191 |
my $duration = $end_dt->delta_ms($start_dt); |
192 |
$start_dt->truncate( to => 'days' ); |
192 |
$start_dt->truncate( to => 'day' ); |
193 |
$end_dt->truncate( to => 'days' ); |
193 |
$end_dt->truncate( to => 'day' ); |
194 |
# NB this is a kludge in that it assumes all days are 24 hours |
194 |
# NB this is a kludge in that it assumes all days are 24 hours |
195 |
# However for hourly loans the logic should be expanded to |
195 |
# However for hourly loans the logic should be expanded to |
196 |
# take into account open/close times then it would be a duration |
196 |
# take into account open/close times then it would be a duration |
197 |
- |
|
|