public diffInWeeks ( 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 diffInWeeks(ChronosInterface $dt = null, $abs = true)
{
return (int) ($this->diffInDays($dt, $abs) / ChronosInterface::DAYS_PER_WEEK);
}