コード例 #1
0
ファイル: TimeRange.php プロジェクト: achristodoulou/calendar
 /**
  * @param TwentyFourHourTime $time
  * @return bool
  */
 public function isTimeInBetween(TwentyFourHourTime $time)
 {
     return $time->getTimeAsInt() >= $this->from->getTimeAsInt() && $time->getTimeAsInt() <= $this->to->getTimeAsInt();
 }
コード例 #2
0
ファイル: Today.php プロジェクト: achristodoulou/calendar
 /**
  * @return bool
  */
 public function isNoonOfWorkingDay()
 {
     if ($this->isWorkingDay() === false) {
         return false;
     }
     $current = $this->dateTime->format('H:i');
     $currentTime = new TwentyFourHourTime($current);
     return $currentTime->isNoon();
 }