Bug 25850: (QA follow-up) Match logic in is_holiday
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit afd88e1d21)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
238b2af84f
commit
4c0d7b14be
|
|
@ -236,11 +236,18 @@ sub get_push_amt {
|
|||
my ( $self, $base_date) = @_;
|
||||
|
||||
my $dow = $base_date->day_of_week;
|
||||
# Representation fix
|
||||
# DateTime object dow (1-7) where Monday is 1
|
||||
# Arrays are 0-based where 0 = Sunday, not 7.
|
||||
if ( $dow == 7 ) {
|
||||
$dow = 0;
|
||||
}
|
||||
|
||||
return (
|
||||
# We're using Dayweek useDaysMode option
|
||||
$self->{days_mode} eq 'Dayweek' &&
|
||||
# It's not a permanently closed day
|
||||
!$self->{weekly_closed_days}->[$dow % 7]
|
||||
!$self->{weekly_closed_days}->[$dow]
|
||||
) ? 7 : 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue