aqui esta la solucion mas facil y funcionable
Código PHP:
Ver originalfunction run_date_diff( $datetime )
{
$date1 = new DateTime($datetime);
$date2 = new DateTime("now");
$interval = $date1->diff($date2);
$years = $interval->format('%y');
$months = $interval->format('%m');
$days = $interval->format('%d');
$hours = $interval->format('%h');
$minutes = $interval->format('%i');
$seconds = $interval->format('%s');
if($years!=0){
$ago = $years.' year '.$months.' month ago';
}elseif($months!=0){
$ago = $months.' month '.$days.' days ago';
}elseif($days!=0){
$ago = $days.' days '.$hours.' hrs ago';
}elseif($hours!=0){
$ago = $hours.' hrs '.$minutes.' min ago';
}elseif($minutes!=0){
$ago = $minutes.' min '.$seconds.' sec ago';
}elseif($seconds!=0){
$ago = $seconds.' sec ago';
}
return $ago;
}