You are here

public function Carbon::lastOfQuarter in Persian Date for Drupal 8 8.4

Modify to the last occurrence of a given day of the week in the current quarter. If no dayOfWeek is provided, modify to the last day of the current quarter. Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY.

Parameters

int|null $dayOfWeek:

Return value

static

File

src/Library/Carbon/Carbon.php, line 3220

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function lastOfQuarter($dayOfWeek = null) {
  return $this
    ->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)
    ->lastOfMonth($dayOfWeek);
}