#native_company# #native_desc#
#native_cta#

Time differnce functions for mins and hrs

By kartik
on May 17, 2005

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;
								}
												
?>