Cake\Chronos\Traits\DifferenceTrait::diffInHours PHP Method

diffInHours() public method

Get the difference in hours
public diffInHours ( Cake\Chronos\ChronosInterface $dt = null, boolean $abs = true ) : integer
$dt Cake\Chronos\ChronosInterface The instance to difference from.
$abs boolean Get the absolute of the difference
return integer
    public function diffInHours(ChronosInterface $dt = null, $abs = true)
    {
        return (int) ($this->diffInSeconds($dt, $abs) / ChronosInterface::SECONDS_PER_MINUTE / ChronosInterface::MINUTES_PER_HOUR);
    }