]> granicus.if.org Git - php/commitdiff
- Added support for the ( and ) delimiters/separators to
authorDerick Rethans <derick@php.net>
Sat, 13 Nov 2010 12:56:21 +0000 (12:56 +0000)
committerDerick Rethans <derick@php.net>
Sat, 13 Nov 2010 12:56:21 +0000 (12:56 +0000)
  DateTime::createFromFormat().
#- There are a few more things to come, once ready, I'll regenerate the .c file
#  and merge.

ext/date/lib/parse_date.re

index 6711369363495ff9a6289898e9d8e90793bebcba..0a711d1f27d1819f73573cc6cb1642f40de968c1 100644 (file)
@@ -1997,7 +1997,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
                                break;
 
                        case '#': /* separation symbol */
-                               if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-') {
+                               if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') {
                                        ++ptr;
                                } else {
                                        add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
@@ -2010,6 +2010,8 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
                        case '.':
                        case ',':
                        case '-':
+                       case '(':
+                       case ')':
                                if (*ptr == *fptr) {
                                        ++ptr;
                                } else {