<?php //$start = DateTime::createFromFormat('U', 1347577200); //$end = DateTime::createFromFormat('U', 1347580800); $start = new DateTime('09/13/2012 7:00pm'); $end = new DateTime('09/13/2012 8:00pm'); $diff = $start->diff($end); print 'Diff: '.$diff->h.' hours, '.$diff->i.' minutes'."\n"; $interval = DateInterval::createFromDateString('30 minutes'); var_dump($interval); $end->add($interval); $diff = $start->diff($end); print "\n".'Diff after interval: '.$diff->h.' hours, '.$diff->i.' minutes'; ?>
You have javascript disabled. You will not be able to edit any code.