@: Well, if it's a unix timestamp (which it can be converted to) then you can do that and get the number of seconds between the two times. Then it's a matter of just subtracting the seconds for years and such.
@: There are time difference functions here for use in PHP.
Weekdiff function by NogDog
Article on Date Difference
Or you could use this mini little function I just whipped up:
/**
* date_diff
*
* @desc Generate a human readable difference in times based on two unix timestamps
*
* @param string format String representation of what your output should look like
* @param integer start A unix timestamp of the start-date
* @param integer end A unix timestamp of the end-date (defaults to now)
*
* @return string Will return the string of information, or the format string on failure
*/
function date_diff($start, $end=null, $format='%y%m%w%d%h%i%s')
{
if(is_null($end) || empty($end))
$end = date('U');
$diff = $end-$start;
$parts = explode('%', $format);
$replace = array();
$multiplier = array(
'y'=>60*60*24*7*52,
'm'=>60*60*24*7*4,
'w'=>60*60*24*7,
'd'=>60*60*24,
'h'=>60*60,
'i'=>60);
$text = array(
'y'=>'year',
'm'=>'month',
'w'=>'week',
'd'=>'day',
'h'=>'hour',
'i'=>'minute',
's'=>'second');
foreach($parts as $part)
{
$part = trim($part);
if(array_key_exists($part, $multiplier))
{
$replace[$part] = floor($diff/$multiplier[$part]);
$diff = $diff-($replace[$part] * $multiplier[$part]);
$format = str_replace('%'.$part, ($replace[$part] . ' ' . $text[$part] . ($replace[$part] == 1 ? '':'s') . ' '), $format);
}
elseif($part == 's')
{
$format = str_replace('%'.$part, ($diff . ' ' . $text[$part] . ($diff == 1 ? '' : 's')), $format);
}
}
return $format;
}
Now, given that, and a date like January 31, 1984, I get:
Since January 31, 1984: 24 years 5 months 3 weeks 6 days 7 hours 46 minutes 19 seconds
Hope that helps.