fix bug in holiday parsing
This commit is contained in:
		
							
								
								
									
										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)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user