function cmfcCalendarV1::secondsToDays in Calendar Systems 8.2
Same name and namespace in other branches
- 8 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
- 5 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
- 6.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
- 6 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
- 7.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
- 7 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
- 7.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::secondsToDays()
convert seconds to days,hours,minuts,seconds as array
Parameters
integer $seconds:
Return value
array
File
- calendar/
v1/ calendarV1.class.inc.php, line 342
Class
Code
function secondsToDays($seconds) {
$days = intval($seconds / 86400);
$remain = $seconds % 86400;
$hours = intval($remain / 3600);
$remain = $remain % 3600;
$mins = intval($remain / 60);
$secs = $remain % 60;
$r = array(
'days' => $days,
'hours' => $hours,
'minutes' => $mins,
'seconds' => $secs,
);
return $r;
}