View Single Post
Old 11-05-2012, 01:36 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Why not just use a DateInterval:
PHP Code:
date_default_timezone_set('UTC');

$dts = new DateTime('05-11-2012 23:15:00');
$dte = new DateTime('06-11-2012 01:15:00');

$di $dte->diff($dtstrue);
print 
$di->format('%H:%I:%S'); 
The object properties can be inspected as well to see what to show. If its <> 0, then its different in some way shape or form, so you can tack on things like years and months systematically this way.
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
nani_nisha06 (11-05-2012)