DateTime
PHP Manual

DateTime::diff

(PHP 5 >= 5.3.0)

DateTime::diffReturns the difference between two DateTime objects

Opis

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

Returns the difference between two DateTime objects.

Parametry

datetime

The date to compare to.

absolute

Whether to return absolute difference. Defaults to FALSE.

Zwracane wartoĊ›ci

The difference between two dates.


DateTime
PHP Manual