0, "dias" => 0, "horas" => 0, "minutos" => 0, "segundos" => 0, ); if($time >= 31556926){ $value["anos"] = floor($time/31556926); $time = ($time%31556926); } if($time >= 86400){ $value["dias"] = floor($time/86400); $time = ($time%86400); } if($time >= 3600){ $value["horas"] = floor($time/3600); $time = ($time%3600); } if($time >= 60){ $value["minutos"] = floor($time/60); $time = ($time%60); } $value["segundos"] = floor($time); return (array) $value; }else{ return (bool) FALSE; } } /* exemplo de Uso: $tempo = d2t(t2d("12:00") - t2d("11:30")); print_r $tempo; retorna ==> Array ( [anos] => 0 [dias] => 0 [horas] => 0 [minutos] => 30 [segundos] => 0 ) */ ?>