You are here

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

Get the minimum instance between a given instance (default now) and the current instance.

Parameters

\Drupal\persian_date\Library\Carbon\Carbon|null $dt:

Return value

static

1 call to Carbon::min()
Carbon::minimum in src/Library/Carbon/Carbon.php
Get the minimum instance between a given instance (default now) and the current instance.

File

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

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function min(Carbon $dt = null) {
  $dt = $dt ?: static::now($this
    ->getTimezone());
  return $this
    ->lt($dt) ? $this : $dt;
}