public average ( Cake\Chronos\ChronosInterface $dt = null ) : static | ||
$dt | Cake\Chronos\ChronosInterface | The instance to compare with. |
return | static |
public function average(ChronosInterface $dt = null)
{
$dt = $dt === null ? static::now($this->tz) : $dt;
return $this->addSeconds((int) ($this->diffInSeconds($dt, false) / 2));
}