You are here

function cmfcCalendarV1Julian::smartGet in Calendar Systems 8.2

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

@desc accept array,timestamp and string as input datetime in jalali or gregorian format

Overrides cmfcCalendarV1::smartGet

File

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

Class

cmfcCalendarV1Julian

Code

function smartGet($type, $value = "now") {
  if ($value != 'now') {
    $value = $this
      ->strtotime($value);
  }
  if (empty($value)) {
    return;
  }
  return $this
    ->date($type, $value);
}