- 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:
Derick Rethans 2010-11-13 12:56:21 +00:00
parent f017a9c93a
commit d763e535cc

View 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 {