Hey 01000111011101010111100101110011 (Guys), and 0100011101101001011100100110110001110011 (Girls),
I have recently been searching the relms of the interwebs for a nice clean date difference calculator, that was built on php. This was too no avail i eventually got fed up with the search and decided screw it i will do this myself. So the following is a really simple calculator that can be used to determine the difference between two dates in hours. :)
function dateDiff($a, $b)
{
$one_hour = 60*60; // Number of seconds in an hour used to convert to hours.
$start = strtotime($a); // Returns the unix timestamp for a specific real date.
$end = strtotime($b);
$dif = floor(($end - $start)/$one_hour); // Determines the number of hours between two dates.
return $dif; // Returns the difference. :)
}
I hope this helps someone eventually. :)
Joshua