business\Time::isAfterOrEqual PHP Метод

isAfterOrEqual() публичный Метод

Checks if this time is after or equal to an other time.
public isAfterOrEqual ( Time $other ) : boolean
$other Time
Результат boolean
    public function isAfterOrEqual(Time $other)
    {
        return $this->toInteger() >= $other->toInteger();
    }

Usage Example

Пример #1
0
 public function testIsAfterOrEqual()
 {
     $time = new Time('20', '00');
     $this->assertTrue($time->isAfterOrEqual(new Time('18', '00')));
     $this->assertFalse($time->isAfterOrEqual(new Time('22', '15')));
     $this->assertTrue($time->isAfterOrEqual(new Time('20', '00')));
 }