Horde_Date::compareTime PHP Method

compareTime() public method

Compares this to another date object by time, to see which one is greater (later). Assumes that the dates are in the same timezone.
public compareTime ( mixed $other ) : integer
$other mixed The date to compare to.
return integer == 0 if they are at the same time >= 1 if $this is greater (later) <= -1 if $other is greater (later)
    public function compareTime($other)
    {
        if (!$other instanceof Horde_Date) {
            $other = new Horde_Date($other);
        }
        if ($this->_hour != $other->hour) {
            return $this->_hour - $other->hour;
        }
        if ($this->_min != $other->min) {
            return $this->_min - $other->min;
        }
        return $this->_sec - $other->sec;
    }