fix bug in holiday parsing
This commit is contained in:
parent
b2de878240
commit
447b4caecb
8
oncall.php
Normal file → Executable file
8
oncall.php
Normal file → Executable file
@ -233,9 +233,11 @@ class oncall {
|
||||
// Is today a holiday?
|
||||
if ($holidays->isHoliday($today)) {
|
||||
$this->everyone = TRUE;
|
||||
$todaysHoliday = $holidays->on($today);
|
||||
$holidayName = $todaysHoliday->getName();
|
||||
$this->sendToMattermost("Happy $holidayName Megaphone Tech! There is no on-call today.");
|
||||
$todaysHolidayIterator = $holidays->on($today);
|
||||
foreach ($todaysHolidayIterator as $todaysHoliday) {
|
||||
$holidayName = $todaysHoliday->getName();
|
||||
}
|
||||
// $this->sendToMattermost("Happy $holidayName Megaphone Tech! There is no on-call today.");
|
||||
}
|
||||
// Don't do anything else if it's a holiday or weekend.
|
||||
if (!$holidays->isWorkingDay($today)) {
|
||||
|
Loading…
Reference in New Issue
Block a user