You are here

function cmfcCalendarV1Iranian::infoArrayToTimestamp in Calendar Systems 8

Same name and namespace in other branches
  1. 8.2 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()
  2. 5 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()
  3. 6.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()
  4. 6 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()
  5. 7.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()
  6. 7 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()
  7. 7.2 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::infoArrayToTimestamp()

Overrides cmfcCalendarV1::infoArrayToTimestamp

1 call to cmfcCalendarV1Iranian::infoArrayToTimestamp()
cmfcCalendarV1Iranian::timestampToInfoArray in calendar/v1/calendarSystems/iranian.class.inc.php

File

calendar/v1/calendarSystems/iranian.class.inc.php, line 108

Class

cmfcCalendarV1Iranian

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']);
}