You are here

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

Resets the date to the first day of the quarter and the time to 00:00:00

Return value

static

File

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

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function startOfQuarter() {
  $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1;
  return $this
    ->setDateTime($this->year, $month, 1, 0, 0, 0);
}