You are here

public static function CarbonInterval::create in Persian Date for Drupal 8 8.4

Create a new CarbonInterval instance from specific values. This is an alias for the constructor that allows better fluent syntax as it allows you to do CarbonInterval::create(1)->fn() rather than (new CarbonInterval(1))->fn().

Parameters

int $years:

int $months:

int $weeks:

int $days:

int $hours:

int $minutes:

int $seconds:

Return value

static

File

src/Library/Carbon/CarbonInterval.php, line 164

Class

CarbonInterval
A simple API extension for DateInterval. The implementation provides helpers to handle weeks but only days are saved. Weeks are calculated based on the total days of the current instance.

Namespace

Drupal\persian_date\Library\Carbon

Code

public static function create($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null) {
  return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds);
}