mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
- Added support for the ( and ) delimiters/separators to
DateTime::createFromFormat(). #- There are a few more things to come, once ready, I'll regenerate the .c file # and merge.
This commit is contained in:
parent
f017a9c93a
commit
d763e535cc
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user