0) { $rest = ($diff % 86400); $days = ($diff - $rest) / 86400; if( $rest % 3600 > 0 ) { $rest1 = ($rest % 3600); $hours = ($rest - $rest1) / 3600; if( $rest1 % 60 > 0 ) { $rest2 = ($rest1 % 60); $minutes = ($rest1 - $rest2) / 60; $seconds = $rest2; }else $minutes = $rest1 / 60; }else $hours = $rest / 3600;} if($days > "1"){ $s1 = "s";}; if($hours > "1"){ $s2 = "s";}; if($minutes > "1"){ $s3 = "s";}; if($seconds > "1"){ $s4 = "s";}; if($days != ""){echo $days." Dia".$s1." ";} if($hours != ""){echo $hours." Hora".$s2." ";} if($minutes != ""){echo $minutes." minuto".$s3." ";} if($seconds != ""){echo $seconds." segundo".$s4." ";} } ?>