PHP 클래스 Kimai_Rounding

파일 보기 프로젝트 열기: kimai/kimai 1 사용 예제들

공개 메소드들

메소드 설명
roundTimespan ( integer $start, integer $end, integer $steps, $allowRoundDown ) : array Find a beginning and end time whose timespan is as close to the real timepsan as possible while being a multiple of $steps (in minutes).

비공개 메소드들

메소드 설명
roundTimespanCheckIfBetter ( &$bestTime, integer $newStart, integer $newEnd, integer $realStart, integer $realEnd, $allowRoundDown ) Check if the new time values are better than the old once in the array.

메소드 상세

roundTimespan() 공개 정적인 메소드

e.g.: 16:07:31 - 17:15:16 is "rounded" to 16:00:00 - 17:15:00 with steps set to 15
public static roundTimespan ( integer $start, integer $end, integer $steps, $allowRoundDown ) : array
$start integer the beginning of the timespan
$end integer the end of the timespan
$steps integer the steps in minutes (has to divide an hour, e.g. 5 is valid while 7 is not)
$allowRoundDown
리턴 array