$date->compare()
Returns the interval between the provided and the object's datetime
Parameters
Name | Type | Default | Description |
---|---|---|---|
$datetime | DateTimeInterface |string |int |
'now' |
|
$timezone | DateTimeZone |null |
null |
Optional default timezone if $datetime is string |
Return type
DateInterval