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?
|
// Is today a holiday?
|
||||||
if ($holidays->isHoliday($today)) {
|
if ($holidays->isHoliday($today)) {
|
||||||
$this->everyone = TRUE;
|
$this->everyone = TRUE;
|
||||||
$todaysHoliday = $holidays->on($today);
|
$todaysHolidayIterator = $holidays->on($today);
|
||||||
$holidayName = $todaysHoliday->getName();
|
foreach ($todaysHolidayIterator as $todaysHoliday) {
|
||||||
$this->sendToMattermost("Happy $holidayName Megaphone Tech! There is no on-call today.");
|
$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.
|
// Don't do anything else if it's a holiday or weekend.
|
||||||
if (!$holidays->isWorkingDay($today)) {
|
if (!$holidays->isWorkingDay($today)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user