You are here

function cmfcCalendarV1Iranian::smartGet in Calendar Systems 5

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

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

File

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

Class

cmfcCalendarV1Iranian

Code

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