Example #1
0
 /**
  * @param TwentyFourHourTime $time
  * @return bool
  */
 public function isTimeInBetween(TwentyFourHourTime $time)
 {
     return $time->getTimeAsInt() >= $this->from->getTimeAsInt() && $time->getTimeAsInt() <= $this->to->getTimeAsInt();
 }
Example #2
0
 /**
  * @return bool
  */
 public function isNoonOfWorkingDay()
 {
     if ($this->isWorkingDay() === false) {
         return false;
     }
     $current = $this->dateTime->format('H:i');
     $currentTime = new TwentyFourHourTime($current);
     return $currentTime->isNoon();
 }