Version: 1.0
Type: Function
Category: Calendars/Dates
License: GNU General Public License
Description: Two functions that return difference in hrs and mins.
<?php function timediffhrs($timein, $timeout){ $timeinsec = strtotime ($timein); $timeoutsec = strtotime ($timeout); $timetot = $timeoutsec - $timeinsec; $timehrs = intval($timetot/3600); $timehrsi =(($timetot/3600)-$timehrs)*60; $timemins = intval(($timetot/60) -$timehrs*60); return $timehrs; } function timediffmins($timein, $timeout){ $timeinsec = strtotime ($timein); $timeoutsec = strtotime ($timeout); $timetot = $timeoutsec - $timeinsec; $timehrs = intval($timetot/3600); $timehrsi =(($timetot/3600)-$timehrs)*60; $timemins = intval(($timetot/60) -$timehrs*60); return $timemins; } ?>