Example #1
0
 /**
  * @param Time $other
  * @return bool
  */
 public function isBefore(Time $other)
 {
     return $this->toInt() < $other->toInt();
 }
Example #2
0
 /**
  * @dataProvider provideIsAfter
  * @param string $firstTime
  * @param string $secondTime
  * @param bool $isAfter
  */
 public function testIsAfter($firstTime, $secondTime, $isAfter)
 {
     $first = Time::fromString($firstTime);
     $second = Time::fromString($secondTime);
     $this->assertEquals($isAfter, $first->isAfter($second));
 }