You are here

function cmfcCalendarV1Iranian::smartGet in Calendar Systems 7

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. 5 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::smartGet()
  4. 6.3 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::smartGet()
  5. 6 calendar/v1/calendarSystems/iranian.class.inc.php \cmfcCalendarV1Iranian::smartGet()
  6. 7.3 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

Overrides cmfcCalendarV1::smartGet

File

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

Class

cmfcCalendarV1Iranian

Code

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