/**
  * @param \Components\Time $time_
  *
  * @return \Components\Date
  */
 public function before(Time $time_)
 {
     return $this->modified('-' . $time_->toSeconds() . ' second');
 }
 private function checkLimits(Time $time)
 {
     return !($this->min && $this->min->toSeconds() > $time->toSeconds()) && !($this->max && $this->max->toSeconds() < $time->toSeconds());
 }
예제 #3
0
 /**
  * Check if this time is equal to another time.
  *
  * @param Time $other The time to compare it against.
  * @return boolean
  */
 public function isEqual(Time $other)
 {
     return $this->toSeconds() === $other->toSeconds();
 }