Skip to content

Commit

Permalink
Fix null holiday handling (resulting from filtering)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Apr 14, 2022
1 parent d5fb585 commit 92a60b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cmixin/BusinessDay/Calculator/HolidayCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ protected function parseHoliday($holiday, &$dateTime = null, $key = null): ?stri
}

$this->holidaysList[$holiday] = true;
}

$holiday = preg_replace('/^(\d)\//', '0$1/', $holiday);
$holiday = preg_replace('/\/(\d(\/\d+)?)$/', '/0$1', $holiday);
$holiday = preg_replace('/^(\d)\//', '0$1/', $holiday);
$holiday = preg_replace('/\/(\d(\/\d+)?)$/', '/0$1', $holiday);
}

return $holiday;
}
Expand Down

0 comments on commit 92a60b4

Please sign in to comment.