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