You are here

function cmfcCalendarV1Julian::dateFormatRfc10 in Calendar Systems 8.2

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

File

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

Class

cmfcCalendarV1Julian

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