function cmfcCalendarV1Julian::infoArrayToTimestamp in Calendar Systems 7
Same name and namespace in other branches
- 8 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::infoArrayToTimestamp()
- 8.2 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::infoArrayToTimestamp()
- 7.2 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::infoArrayToTimestamp()
Overrides cmfcCalendarV1::infoArrayToTimestamp
1 call to cmfcCalendarV1Julian::infoArrayToTimestamp()
- cmfcCalendarV1Julian::timestampToInfoArray in calendar/
v1/ calendarSystems/ julian.class.inc.php
File
- calendar/
v1/ calendarSystems/ julian.class.inc.php, line 117
Class
Code
function infoArrayToTimestamp($arr) {
list($gy, $gm, $gd) = $this
->toGregorian($arr['year'], $arr['month'], $arr['day']);
if (!isset($arr['hour'])) {
$arr['hour'] = $this
->phpDate('H');
}
if (!isset($arr['minute'])) {
$arr['minute'] = $this
->phpDate('i');
}
if (!isset($arr['second'])) {
$arr['second'] = $this
->phpDate('s');
}
return strtotime("{$gy}-{$gm}-{$gd}" . ' ' . $arr['hour'] . ':' . $arr['minute'] . ':' . $arr['second']);
}