public function Carbon::diffInDays in Persian Date for Drupal 8 8.4
Get the difference in days
Parameters
\Drupal\persian_date\Library\Carbon\Carbon|null $dt:
bool $abs Get the absolute of the difference:
Return value
int
1 call to Carbon::diffInDays()
- Carbon::diffInWeeks in src/
Library/ Carbon/ Carbon.php - Get the difference in weeks
File
- src/
Library/ Carbon/ Carbon.php, line 2620
Class
- Carbon
- A simple API extension for DateTime
Namespace
Drupal\persian_date\Library\CarbonCode
public function diffInDays(Carbon $dt = null, $abs = true) {
$dt = $dt ?: static::now($this
->getTimezone());
return (int) $this
->diff($dt, $abs)
->format('%r%a');
}