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