You are here

function cmfcCalendarV1Iranian::dateFormatRfc10 in Calendar Systems 7.3

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

File

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

Class

cmfcCalendarV1Iranian

Code

function dateFormatRfc10($value) {
  if (is_string($value)) {
    if (preg_match('/^([0-9]{2,4})[-\\/\\\\]([0-9]{1,2})[-\\/\\\\]([0-9]{1,2})( +([0-9]{1,2})[:]([0-9]{1,2})[:]([0-9]{1,2}))?/', $value, $regs)) {
      $y = $regs['1'];
      $m = $regs['2'];
      $d = $regs['3'];
      $h = $regs['5'];
      $i = $regs['6'];
      $s = $regs['7'];
    }
    return $this
      ->valueToTimeStamp($y, $m, $d, $h, $i, $s);
  }
  return false;
}