$ancien="19860929090000"; $nouveau= date("Ymdis"); function elapsedTime($from , $to){ $tyear = substr($from, 0, 4); $tmonth = substr($from, 4, 2); $tday = substr($from, 6, 2); $thour = substr($from, 8, 2); $tminute = substr($from, 10, 2); $tsecond = substr($from, 12, 2); $from = mktime($thour, $tminute, $tsecond, $tmonth, $tday, $tyear); $tyear = substr($to, 0, 4); $tmonth = substr($to, 4, 2); $tday = substr($to, 6, 2); $thour = substr($to, 8, 2); $tminute = substr($to, 10, 2); $tsecond = substr($to, 12, 2); $to = mktime($thour, $tminute, $tsecond, $tmonth, $tday, $tyear); $temp = $to-$from; return $temp; } $temps = elapsedTime($ancien,$nouveau); ?>
echo "