Documentation
getDifference
usage
number = Date->getDifference( Date otherdate );
parameters
otherdate: the function will compute the difference between the time represented in the object itself and this object otherdate; otherdate is a past date compared to the one represented in this object.
returns
The difference in seconds between two dates
examples
include_once('../sushee/common.php');
$time1 = new Date('2011-02-01 17:00:38');
$time2 = new Date('2011-02-01 18:02:38');
echo $time2->getDifference($time1).' seconds'; // displays 3720 seconds == 1 hour (3600 sec), 2 minutes (120 sec)