You are here

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

Sets the current date of the DateTime object to a different date. Calls modify as a workaround for a php bug

Parameters

int $year:

int $month:

int $day:

Return value

static

See also

https://github.com/briannesbitt/Carbon/issues/539

https://bugs.php.net/bug.php?id=63863

File

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

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function setDate($year, $month, $day) {
  $this
    ->modify('+0 day');
  return parent::setDate($year, $month, $day);
}