@@ 11558-11567 (lines=10) @@ | ||
11555 | public function date_rfc850($date) |
|
11556 | { |
|
11557 | static $pcre; |
|
11558 | if (!$pcre) |
|
11559 | { |
|
11560 | $space = '[\x09\x20]+'; |
|
11561 | $day_name = $this->day_pcre; |
|
11562 | $month = $this->month_pcre; |
|
11563 | $day = '([0-9]{1,2})'; |
|
11564 | $year = $hour = $minute = $second = '([0-9]{2})'; |
|
11565 | $zone = '([A-Z]{1,5})'; |
|
11566 | $pcre = '/^' . $day_name . ',' . $space . $day . '-' . $month . '-' . $year . $space . $hour . ':' . $minute . ':' . $second . $space . $zone . '$/i'; |
|
11567 | } |
|
11568 | if (preg_match($pcre, $date, $match)) |
|
11569 | { |
|
11570 | /* |
|
@@ 11613-11623 (lines=11) @@ | ||
11610 | public function date_asctime($date) |
|
11611 | { |
|
11612 | static $pcre; |
|
11613 | if (!$pcre) |
|
11614 | { |
|
11615 | $space = '[\x09\x20]+'; |
|
11616 | $wday_name = $this->day_pcre; |
|
11617 | $mon_name = $this->month_pcre; |
|
11618 | $day = '([0-9]{1,2})'; |
|
11619 | $hour = $sec = $min = '([0-9]{2})'; |
|
11620 | $year = '([0-9]{4})'; |
|
11621 | $terminator = '\x0A?\x00?'; |
|
11622 | $pcre = '/^' . $wday_name . $space . $mon_name . $space . $day . $space . $hour . ':' . $min . ':' . $sec . $space . $year . $terminator . '$/i'; |
|
11623 | } |
|
11624 | if (preg_match($pcre, $date, $match)) |
|
11625 | { |
|
11626 | /* |