Freelance PHP programmer India | Freelance web developer india | Web development India | web developer CV india | Compiling PHP and Apache 2 from source on Linux
DateTime
PHP Manual

DateTime::diff

(No version information available, might be only in CVS)

DateTime::diffReturns the difference between two DateTime objects

Description

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

Returns the difference between two DateTime objects.

Parameters

datetime

The date to compare to.

absolute

Whether to return absolute difference. Defaults to FALSE.

Return Values

The difference between two dates.


DateTime
PHP Manual