Lines 173-181
sub days_between {
Link Here
|
173 |
my $dateend_temp = $end_dt->clone(); |
173 |
my $dateend_temp = $end_dt->clone(); |
174 |
|
174 |
|
175 |
# start and end should not be closed days |
175 |
# start and end should not be closed days |
176 |
my $duration = $dateend_temp->delta_days($datestart_temp); |
176 |
$datestart_temp->truncate( to => 'day' ); |
177 |
$datestart_temp->truncate( to => 'days' ); |
177 |
$dateend_temp->truncate( to => 'day' ); |
178 |
$dateend_temp->truncate( to => 'days' ); |
178 |
my $duration = $dateend_temp - $datestart_temp; |
179 |
while ( DateTime->compare( $datestart_temp, $dateend_temp ) == -1 ) { |
179 |
while ( DateTime->compare( $datestart_temp, $dateend_temp ) == -1 ) { |
180 |
$datestart_temp->add( days => 1 ); |
180 |
$datestart_temp->add( days => 1 ); |
181 |
if ( $self->is_holiday($datestart_temp) ) { |
181 |
if ( $self->is_holiday($datestart_temp) ) { |
182 |
- |
|
|