public function Carbon::farthest in Persian Date for Drupal 8 8.4
Get the farthest date from the instance.
Parameters
Carbon $dt1:
Carbon $dt2:
Return value
static
File
- src/
Library/ Carbon/ Carbon.php, line 1600
Class
- Carbon
- A simple API extension for DateTime
Namespace
Drupal\persian_date\Library\CarbonCode
public function farthest(Carbon $dt1, Carbon $dt2) {
return $this
->diffInSeconds($dt1) > $this
->diffInSeconds($dt2) ? $dt1 : $dt2;
}