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')));
 }