>  Q&A  >  본문

두 시간 사이의 간격을 구하세요.

//두 기간의 길이 계산 public function GetTimeLong($time1,$time2,$format="i"){ $length = abs($time2 - $time1) if($format=="d") { $long = $this->GetFormatOne($length/86400)."일"; }elseif ($format=="h"){     $long = $this->GetFormatOne($length/3600)." 시간 "; }elseif ($format=="i"){ } $long = $this->GetFormatOne($length/60)."분"; }else{     $long = $length."초"; } return $ long;}//소수점 한 자리 유지 function GetFormatOne($num){ $result = $format_num = sprintf("%.1f",$num); return $result;}

XuPing.YangXuPing.Yang1263일 전984

모든 응답(0)나는 대답할 것이다

답장 없음
  • 취소회신하다