Well I find timstamps easiest to use so this is how I'd do it.
$time_in = '1918-10-21 06:30:00';
//extract the parts of the time into the $matches or exit
if(!preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})\s([0-9]{2}):([0-9]{2}):([0-9]{2})$', $matches)) {
exit('Invalid time in '.$time_in);
}
//make them into a timestamp
$timestamp_in=mktime($matches[4],$matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
//get the current timestamp
$timestamp_out=time();
//is $time_in in the future or the past? then find the difference
if($timestamp_in>$timetamp_out) {
$future=true;
$difference=$timestamp_in-$timestamp_out;
} else {
$future=false;
$difference=$timestamp_out-$timestamp_in;
}
//work out how many of each time unit there are
$seconds = $difference%60;
$difference = intval($difference/60);
$minutes = $difference%60;
$difference = intval($difference/60);
$hours = $difference%24;
$difference = intval($difference/24);
$days = $difference%365; //sod them pesky leap years
$years = intval($difference/365);
I haven't testde this so there may be a couple of errors.
HTH
Bubble