@@ 4748-4753 (lines=6) @@ | ||
4745 | } |
|
4746 | ||
4747 | switch ($this->config['datetime_format']) { |
|
4748 | case 'YYYY/mm/dd': |
|
4749 | if (!preg_match('/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}[0-9 :]*$/', $str)) { |
|
4750 | return ''; |
|
4751 | } |
|
4752 | list ($Y, $m, $d, $H, $M, $S) = sscanf($str, '%4d/%2d/%2d %2d:%2d:%2d'); |
|
4753 | break; |
|
4754 | case 'dd-mm-YYYY': |
|
4755 | if (!preg_match('/^[0-9]{2}-[0-9]{2}-[0-9]{4}[0-9 :]*$/', $str)) { |
|
4756 | return ''; |
|
@@ 4754-4759 (lines=6) @@ | ||
4751 | } |
|
4752 | list ($Y, $m, $d, $H, $M, $S) = sscanf($str, '%4d/%2d/%2d %2d:%2d:%2d'); |
|
4753 | break; |
|
4754 | case 'dd-mm-YYYY': |
|
4755 | if (!preg_match('/^[0-9]{2}-[0-9]{2}-[0-9]{4}[0-9 :]*$/', $str)) { |
|
4756 | return ''; |
|
4757 | } |
|
4758 | list ($d, $m, $Y, $H, $M, $S) = sscanf($str, '%2d-%2d-%4d %2d:%2d:%2d'); |
|
4759 | break; |
|
4760 | case 'mm/dd/YYYY': |
|
4761 | if (!preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}[0-9 :]*$/', $str)) { |
|
4762 | return ''; |
|
@@ 4760-4765 (lines=6) @@ | ||
4757 | } |
|
4758 | list ($d, $m, $Y, $H, $M, $S) = sscanf($str, '%2d-%2d-%4d %2d:%2d:%2d'); |
|
4759 | break; |
|
4760 | case 'mm/dd/YYYY': |
|
4761 | if (!preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}[0-9 :]*$/', $str)) { |
|
4762 | return ''; |
|
4763 | } |
|
4764 | list ($m, $d, $Y, $H, $M, $S) = sscanf($str, '%2d/%2d/%4d %2d:%2d:%2d'); |
|
4765 | break; |
|
4766 | /* |
|
4767 | case 'dd-mmm-YYYY': |
|
4768 | if (!preg_match('/^[0-9]{2}-[0-9a-z]+-[0-9]{4}[0-9 :]*$/i', $str)) {return '';} |