コード例 #1
0
ファイル: Carbon.php プロジェクト: nomantufail/virik_updating
 /**
  * Get the difference in seconds
  *
  * @param Carbon  $dt
  * @param boolean $abs Get the absolute of the difference
  *
  * @return integer
  */
 public function diffInSeconds(Carbon $dt = null, $abs = true)
 {
     $value = ($dt === null ? time() : $dt->getTimestamp()) - $this->getTimestamp();
     return $abs ? abs($value) : $value;
 }