You are here

function cmfcCalendarV1Iranian::valueToTimeStamp in Calendar Systems 7

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

File

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

Class

cmfcCalendarV1Iranian

Code

function valueToTimeStamp($y, $m, $d, $h, $i, $s) {
  $y = intval(strval($y));
  $m = intval(strval($m));
  $d = intval(strval($d));
  $h = intval(strval($h));
  $i = intval(strval($i));
  $s = intval(strval($s));
  if ($y < 1900) {
    list($y, $m, $d) = $this
      ->toGregorian($y, $m, $d);
  }
  if (!empty($h) or $h != 0) {
    $value = strtotime("{$y}-{$m}-{$d} {$h}:{$i}:{$s}");
  }
  else {
    $value = strtotime("{$y}-{$m}-{$d}");
  }
  return $value;
}