You are here

function cmfcCalendarV1Julian::valueToTimeStamp in Calendar Systems 8.2

Same name and namespace in other branches
  1. 8 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::valueToTimeStamp()
  2. 7 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::valueToTimeStamp()
  3. 7.2 calendar/v1/calendarSystems/julian.class.inc.php \cmfcCalendarV1Julian::valueToTimeStamp()
2 calls to cmfcCalendarV1Julian::valueToTimeStamp()
cmfcCalendarV1Julian::dateFormatArraySimple in calendar/v1/calendarSystems/julian.class.inc.php
cmfcCalendarV1Julian::dateFormatRfc10 in calendar/v1/calendarSystems/julian.class.inc.php

File

calendar/v1/calendarSystems/julian.class.inc.php, line 495

Class

cmfcCalendarV1Julian

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;
}