public function Carbon::diffInWeeks in Persian Date for Drupal 8 8.4
Get the difference in weeks
Parameters
\Drupal\persian_date\Library\Carbon\Carbon|null $dt:
bool $abs Get the absolute of the difference:
Return value
int
File
- src/
Library/ Carbon/ Carbon.php, line 2607
Class
- Carbon
- A simple API extension for DateTime
Namespace
Drupal\persian_date\Library\CarbonCode
public function diffInWeeks(Carbon $dt = null, $abs = true) {
return (int) ($this
->diffInDays($dt, $abs) / static::DAYS_PER_WEEK);
}