PHP Portal » PHP Handbuch » DateTime::diff

Werbung

DateTime::diff


(PHP 5 >= 5.3.0)

DateTime::diffReturns the difference between two DateTime objects

Beschreibung

public DateInterval DateTime::diff ( DateTime $datetime [, bool $absolute = false ] )

Returns the difference between two DateTime objects.

Parameter-Liste

datetime

The date to compare to.

absolute

Whether to return absolute difference.

Rückgabewerte

The difference between two dates.