You are here

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

Modify to the next occurrence of a given day of the week. If no dayOfWeek is provided, modify to the next occurrence of the current day of the week. 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 3046

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function next($dayOfWeek = null) {
  if ($dayOfWeek === null) {
    $dayOfWeek = $this->dayOfWeek;
  }
  return $this
    ->startOfDay()
    ->modify('next ' . static::$days[$dayOfWeek]);
}