Method | Description | |
---|---|---|
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). |
Method | Description | |
---|---|---|
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. |
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 | ||
return | array |