summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2008-05-01 16:15:45 +0000
committerDerick Rethans <derick@php.net>2008-05-01 16:15:45 +0000
commit97b37f253c13d5db9d620c6cf78829cd49b340d0 (patch)
treedd5adde1f11a56ce1d8e141cdcc2c4bd2e1dc6b4
parent1b435af32624b40aa18d94390cd4aeb3e57539ea (diff)
downloadphp-git-97b37f253c13d5db9d620c6cf78829cd49b340d0.tar.gz
- MFH: Rearranged some structures to allow for more powerfull period/intervals.
-rw-r--r--ext/date/lib/parse_date.c406
-rw-r--r--ext/date/lib/parse_date.re14
-rw-r--r--ext/date/lib/timelib.c18
-rw-r--r--ext/date/lib/timelib_structs.h16
-rw-r--r--ext/date/lib/tm2unixtime.c12
-rw-r--r--ext/date/php_date.c36
6 files changed, 250 insertions, 252 deletions
diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c
index f57e6936cc..68706206cb 100644
--- a/ext/date/lib/parse_date.c
+++ b/ext/date/lib/parse_date.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.3 on Sun Apr 27 20:57:09 2008 */
+/* Generated by re2c 0.13.4 on Thu May 1 18:11:55 2008 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
@@ -108,8 +108,8 @@ typedef unsigned char uchar;
#define TIMELIB_HAVE_DATE() { if (s->time->have_date) { add_error(s, "Double date specification"); timelib_string_free(str); return TIMELIB_ERROR; } else { s->time->have_date = 1; } }
#define TIMELIB_UNHAVE_DATE() { s->time->have_date = 0; s->time->d = 0; s->time->m = 0; s->time->y = 0; }
#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; }
-#define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_weekday_relative = 1; }
-#define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_special_relative = 1; }
+#define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_weekday_relative = 1; }
+#define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_special_relative = 1; }
#define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { s->time->have_zone > 1 ? add_error(s, "Double timezone specification") : add_warning(s, "Double timezone specification"); timelib_string_free(str); s->time->have_zone++; return TIMELIB_ERROR; } else { s->time->have_zone++; } }
#define TIMELIB_INIT s->cur = cursor; str = timelib_string(s); ptr = str
@@ -681,8 +681,8 @@ static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, S
case TIMELIB_SPECIAL:
TIMELIB_HAVE_SPECIAL_RELATIVE();
TIMELIB_UNHAVE_TIME();
- s->time->special.type = relunit->multiplier;
- s->time->special.amount = amount;
+ s->time->relative.special.type = relunit->multiplier;
+ s->time->relative.special.amount = amount;
}
}
@@ -886,8 +886,8 @@ std:
YYDEBUG(-1, yych);
switch (yych) {
case 0x00:
- case 0x0A: goto yy49;
- case 0x09:
+ case '\n': goto yy49;
+ case '\t':
case ' ': goto yy46;
case '(': goto yy43;
case '+':
@@ -1441,7 +1441,7 @@ yy17:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09: goto yy1225;
+ case '\t': goto yy1225;
case ' ':
case 'A':
case 'D':
@@ -1493,7 +1493,7 @@ yy18:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09: goto yy640;
+ case '\t': goto yy640;
case ' ':
case 'A':
case 'D':
@@ -1547,7 +1547,7 @@ yy19:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09: goto yy640;
+ case '\t': goto yy640;
case ' ':
case 'A':
case 'D':
@@ -1601,7 +1601,7 @@ yy20:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09: goto yy640;
+ case '\t': goto yy640;
case ' ':
case 'A':
case 'D':
@@ -1655,7 +1655,7 @@ yy21:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09: goto yy640;
+ case '\t': goto yy640;
case ' ':
case 'A':
case 'D':
@@ -1732,7 +1732,7 @@ yy23:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy3;
goto yy317;
} else {
@@ -1775,7 +1775,7 @@ yy24:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy3;
goto yy317;
} else {
@@ -1806,7 +1806,7 @@ yy25:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy3;
goto yy317;
} else {
@@ -2368,7 +2368,7 @@ yy52:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy57;
+ if (yych == '\t') goto yy57;
if (yych >= ' ') goto yy57;
} else {
if (yych == 'D') goto yy62;
@@ -2553,7 +2553,7 @@ yy54:
yy55:
YYDEBUG(55, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(56, *YYCURSOR);
if (yybm[0+yych] & 8) {
@@ -2572,7 +2572,7 @@ yy58:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy57;
+ if (yych == '\t') goto yy57;
if (yych <= 0x1F) goto yy54;
goto yy57;
} else {
@@ -3264,13 +3264,13 @@ yy144:
yy145:
YYDEBUG(145, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if (yych <= '@') goto yy54;
if (yych >= '[') goto yy54;
YYDEBUG(146, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if (yybm[0+yych] & 16) {
goto yy147;
@@ -3280,7 +3280,7 @@ yy147:
YYDEBUG(147, *YYCURSOR);
yyaccept = 0;
YYMARKER = ++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(148, *YYCURSOR);
if (yybm[0+yych] & 16) {
@@ -3353,7 +3353,7 @@ yy151:
yy152:
YYDEBUG(152, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy153:
YYDEBUG(153, *YYCURSOR);
@@ -3591,7 +3591,7 @@ yy169:
yy170:
YYDEBUG(170, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 0x09) goto yy171;
+ if (yych == '\t') goto yy171;
if (yych != ' ') goto yy54;
yy171:
YYDEBUG(171, *YYCURSOR);
@@ -3603,7 +3603,7 @@ yy172:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy171;
+ if (yych == '\t') goto yy171;
if (yych <= 0x1F) goto yy54;
goto yy171;
} else {
@@ -4245,7 +4245,7 @@ yy253:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy3;
goto yy171;
} else {
@@ -4420,7 +4420,7 @@ yy261:
YYDEBUG(261, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '.') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy54;
goto yy171;
} else {
@@ -4494,7 +4494,7 @@ yy264:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy171;
+ if (yych == '\t') goto yy171;
goto yy3;
} else {
if (yych <= ' ') goto yy171;
@@ -4621,7 +4621,7 @@ yy270:
yy271:
YYDEBUG(271, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 0x09) goto yy272;
+ if (yych == '\t') goto yy272;
if (yych != ' ') goto yy54;
yy272:
YYDEBUG(272, *YYCURSOR);
@@ -4633,7 +4633,7 @@ yy273:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy272;
+ if (yych == '\t') goto yy272;
if (yych <= 0x1F) goto yy54;
goto yy272;
} else {
@@ -4737,7 +4737,7 @@ yy278:
s->time->relative.weekday_behavior = 2;
/* to handle the format weekday + last/this/next week */
- if (s->time->have_weekday_relative == 0) {
+ if (s->time->relative.have_weekday_relative == 0) {
TIMELIB_HAVE_WEEKDAY_RELATIVE();
s->time->relative.weekday = 1;
}
@@ -4877,7 +4877,7 @@ yy284:
YYDEBUG(285, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '.') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy54;
goto yy272;
} else {
@@ -5402,8 +5402,8 @@ yy314:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
- if (yych >= 0x09) goto yy317;
+ if (yych <= '\t') {
+ if (yych >= '\t') goto yy317;
} else {
if (yych == ' ') goto yy317;
}
@@ -5622,7 +5622,7 @@ yy327:
yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy315;
goto yy317;
} else {
@@ -5844,7 +5844,7 @@ yy350:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '*') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy352;
+ if (yych == '\t') goto yy352;
goto yy344;
} else {
if (yych <= ' ') goto yy352;
@@ -5872,7 +5872,7 @@ yy352:
YYDEBUG(352, *YYCURSOR);
if (yych <= '+') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy351;
+ if (yych == '\t') goto yy351;
if (yych <= 0x1F) goto yy54;
goto yy351;
} else {
@@ -6046,13 +6046,13 @@ yy364:
yy365:
YYDEBUG(365, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if (yych <= '@') goto yy54;
if (yych >= '[') goto yy54;
YYDEBUG(366, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if (yych <= '`') goto yy54;
if (yych >= '{') goto yy54;
@@ -6060,7 +6060,7 @@ yy367:
YYDEBUG(367, *YYCURSOR);
yyaccept = 9;
YYMARKER = ++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(368, *YYCURSOR);
if (yych <= '^') {
@@ -6134,7 +6134,7 @@ yy369:
yy372:
YYDEBUG(372, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(373, *YYCURSOR);
if (yych <= '^') {
@@ -6328,7 +6328,7 @@ yy392:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '*') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy394;
+ if (yych == '\t') goto yy394;
goto yy344;
} else {
if (yych <= ' ') goto yy394;
@@ -6356,7 +6356,7 @@ yy394:
YYDEBUG(394, *YYCURSOR);
if (yych <= '@') {
if (yych <= '\'') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy54;
goto yy393;
} else {
@@ -6453,7 +6453,7 @@ yy398:
yyaccept = 9;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ')') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy400;
if (yych <= 0x08) goto yy344;
goto yy400;
@@ -6475,7 +6475,7 @@ yy398:
yy399:
YYDEBUG(399, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy400;
if (yych <= 0x08) goto yy54;
} else {
@@ -6514,7 +6514,7 @@ yy402:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy400;
- if (yych == 0x09) goto yy400;
+ if (yych == '\t') goto yy400;
goto yy54;
} else {
if (yych <= ' ') goto yy400;
@@ -6528,7 +6528,7 @@ yy403:
if (yych <= '-') {
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy400;
- if (yych == 0x09) goto yy400;
+ if (yych == '\t') goto yy400;
goto yy344;
} else {
if (yych <= ' ') goto yy400;
@@ -6558,7 +6558,7 @@ yy404:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy405;
+ if (yych == '\t') goto yy405;
if (yych <= 0x1F) goto yy344;
} else {
if (yych == '.') goto yy389;
@@ -6588,7 +6588,7 @@ yy405:
YYDEBUG(406, *YYCURSOR);
if (yych <= 'A') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy405;
+ if (yych == '\t') goto yy405;
goto yy54;
} else {
if (yych <= ' ') goto yy405;
@@ -6622,7 +6622,7 @@ yy409:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy400;
- if (yych == 0x09) goto yy400;
+ if (yych == '\t') goto yy400;
goto yy54;
} else {
if (yych <= ' ') goto yy400;
@@ -6631,7 +6631,7 @@ yy409:
yy410:
YYDEBUG(410, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy400;
if (yych <= 0x08) goto yy54;
goto yy400;
@@ -6966,7 +6966,7 @@ yy438:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy440;
+ if (yych == '\t') goto yy440;
if (yych <= 0x1F) goto yy344;
goto yy440;
} else {
@@ -7004,7 +7004,7 @@ yy440:
YYDEBUG(440, *YYCURSOR);
if (yych <= '@') {
if (yych <= '\'') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy54;
goto yy439;
} else {
@@ -7095,7 +7095,7 @@ yy443:
yyaccept = 9;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ')') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy400;
if (yych <= 0x08) goto yy344;
goto yy400;
@@ -7125,7 +7125,7 @@ yy445:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy400;
- if (yych == 0x09) goto yy400;
+ if (yych == '\t') goto yy400;
goto yy54;
} else {
if (yych <= ' ') goto yy400;
@@ -7134,7 +7134,7 @@ yy445:
yy446:
YYDEBUG(446, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy400;
if (yych <= 0x08) goto yy54;
goto yy400;
@@ -7149,7 +7149,7 @@ yy447:
if (yych <= '-') {
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy400;
- if (yych == 0x09) goto yy400;
+ if (yych == '\t') goto yy400;
goto yy344;
} else {
if (yych <= ' ') goto yy400;
@@ -7179,7 +7179,7 @@ yy448:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy405;
+ if (yych == '\t') goto yy405;
if (yych <= 0x1F) goto yy320;
goto yy405;
} else {
@@ -7213,7 +7213,7 @@ yy449:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy405;
+ if (yych == '\t') goto yy405;
if (yych <= 0x1F) goto yy320;
goto yy405;
} else {
@@ -7277,7 +7277,7 @@ yy453:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy394;
+ if (yych == '\t') goto yy394;
if (yych <= 0x1F) goto yy344;
goto yy394;
} else {
@@ -7312,7 +7312,7 @@ yy454:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy405;
+ if (yych == '\t') goto yy405;
if (yych <= 0x1F) goto yy320;
goto yy405;
} else {
@@ -7466,7 +7466,7 @@ yy465:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy467;
+ if (yych == '\t') goto yy467;
if (yych <= 0x1F) goto yy344;
goto yy467;
} else {
@@ -7504,7 +7504,7 @@ yy467:
YYDEBUG(467, *YYCURSOR);
if (yych <= '@') {
if (yych <= '\'') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy54;
goto yy466;
} else {
@@ -7595,7 +7595,7 @@ yy470:
yyaccept = 9;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ')') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy400;
if (yych <= 0x08) goto yy344;
goto yy400;
@@ -7622,7 +7622,7 @@ yy471:
if (yych <= '-') {
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy400;
- if (yych == 0x09) goto yy400;
+ if (yych == '\t') goto yy400;
goto yy344;
} else {
if (yych <= ' ') goto yy400;
@@ -7706,7 +7706,7 @@ yy477:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy352;
+ if (yych == '\t') goto yy352;
if (yych <= 0x1F) goto yy344;
goto yy352;
} else {
@@ -8052,7 +8052,7 @@ yy495:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -8175,7 +8175,7 @@ yy500:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy315;
} else {
if (yych <= ' ') goto yy317;
@@ -8222,7 +8222,7 @@ yy502:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -8344,7 +8344,7 @@ yy507:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -8761,7 +8761,7 @@ yy526:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -8948,7 +8948,7 @@ yy534:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy171;
+ if (yych == '\t') goto yy171;
goto yy3;
} else {
if (yych <= ' ') goto yy171;
@@ -8961,7 +8961,7 @@ yy535:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -9414,7 +9414,7 @@ yy555:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -9632,7 +9632,7 @@ yy563:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ')') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy171;
+ if (yych == '\t') goto yy171;
goto yy3;
} else {
if (yych <= ' ') goto yy171;
@@ -9656,7 +9656,7 @@ yy564:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -9847,8 +9847,8 @@ yy573:
if (s->time->relative.weekday == 0) {
s->time->relative.weekday = -7;
}
- if (s->time->have_special_relative && s->time->special.type == TIMELIB_SPECIAL_WEEKDAY) {
- s->time->special.amount = 0 - s->time->special.amount;
+ if (s->time->relative.have_special_relative && s->time->relative.special.type == TIMELIB_SPECIAL_WEEKDAY) {
+ s->time->relative.special.amount = 0 - s->time->relative.special.amount;
}
TIMELIB_DEINIT;
return TIMELIB_AGO;
@@ -9860,7 +9860,7 @@ yy574:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -9924,7 +9924,7 @@ yy576:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy315;
} else {
if (yych <= ' ') goto yy317;
@@ -9949,7 +9949,7 @@ yy577:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10034,7 +10034,7 @@ yy580:
yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10156,7 +10156,7 @@ yy585:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10226,7 +10226,7 @@ yy587:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy315;
goto yy317;
} else {
@@ -10257,7 +10257,7 @@ yy588:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10352,7 +10352,7 @@ yy591:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy315;
} else {
if (yych <= ' ') goto yy317;
@@ -10423,7 +10423,7 @@ yy594:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10514,7 +10514,7 @@ yy598:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10557,7 +10557,7 @@ yy599:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10599,7 +10599,7 @@ yy600:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy315;
} else {
if (yych <= ' ') goto yy317;
@@ -10689,7 +10689,7 @@ yy603:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10807,7 +10807,7 @@ yy607:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10852,7 +10852,7 @@ yy608:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -10897,7 +10897,7 @@ yy609:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy315;
goto yy317;
} else {
@@ -10928,7 +10928,7 @@ yy610:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy3;
goto yy317;
} else {
@@ -10958,7 +10958,7 @@ yy611:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy3;
} else {
if (yych <= ' ') goto yy317;
@@ -10983,7 +10983,7 @@ yy612:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy3;
goto yy317;
} else {
@@ -11012,7 +11012,7 @@ yy612:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy3;
goto yy317;
} else {
@@ -11041,7 +11041,7 @@ yy612:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy3;
} else {
if (yych <= ' ') goto yy317;
@@ -11066,7 +11066,7 @@ yy615:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
goto yy3;
} else {
if (yych <= ' ') goto yy317;
@@ -11091,7 +11091,7 @@ yy616:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy3;
goto yy317;
} else {
@@ -11123,7 +11123,7 @@ yy617:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11190,7 +11190,7 @@ yy618:
if (yych <= 'T') {
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11266,7 +11266,7 @@ yy619:
if (yych <= 'T') {
if (yych <= 'C') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11334,7 +11334,7 @@ yy619:
yy620:
YYDEBUG(620, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(621, *YYCURSOR);
if (yybm[0+yych] & 8) {
@@ -11356,7 +11356,7 @@ yy622:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11419,7 +11419,7 @@ yy623:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11557,7 +11557,7 @@ yy636:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11620,7 +11620,7 @@ yy637:
if (yych <= 'T') {
if (yych <= 'C') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11690,7 +11690,7 @@ yy637:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11756,7 +11756,7 @@ yy639:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy3;
goto yy58;
} else {
@@ -11828,7 +11828,7 @@ yy642:
YYDEBUG(642, *YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ': goto yy641;
case '-':
case '.': goto yy757;
@@ -12092,7 +12092,7 @@ yy655:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
} else {
if (yych <= ' ') goto yy712;
if (yych <= ',') goto yy656;
@@ -12126,7 +12126,7 @@ yy657:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -12148,7 +12148,7 @@ yy658:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -12243,7 +12243,7 @@ yy666:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy668;
- if (yych == 0x09) goto yy668;
+ if (yych == '\t') goto yy668;
goto yy54;
} else {
if (yych <= ' ') goto yy668;
@@ -12251,7 +12251,7 @@ yy666:
}
YYDEBUG(667, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy668;
if (yych <= 0x08) goto yy54;
} else {
@@ -12358,7 +12358,7 @@ yy677:
yy678:
YYDEBUG(678, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(679, *YYCURSOR);
if (yych <= '/') goto yy671;
@@ -12370,7 +12370,7 @@ yy680:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '@') {
if (yych <= 0x1F) {
- if (yych != 0x09) goto yy671;
+ if (yych != '\t') goto yy671;
} else {
if (yych <= ' ') goto yy681;
if (yych == '.') goto yy677;
@@ -12395,7 +12395,7 @@ yy681:
YYDEBUG(682, *YYCURSOR);
if (yych <= 'A') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy681;
+ if (yych == '\t') goto yy681;
goto yy54;
} else {
if (yych <= ' ') goto yy681;
@@ -12428,7 +12428,7 @@ yy685:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy668;
- if (yych == 0x09) goto yy668;
+ if (yych == '\t') goto yy668;
goto yy54;
} else {
if (yych <= ' ') goto yy668;
@@ -12436,7 +12436,7 @@ yy685:
}
YYDEBUG(686, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy668;
if (yych <= 0x08) goto yy54;
goto yy668;
@@ -12450,7 +12450,7 @@ yy687:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy688;
+ if (yych == '\t') goto yy688;
if (yych <= 0x1F) goto yy671;
} else {
if (yych == '.') goto yy673;
@@ -12480,7 +12480,7 @@ yy688:
YYDEBUG(689, *YYCURSOR);
if (yych <= 'A') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy688;
+ if (yych == '\t') goto yy688;
goto yy54;
} else {
if (yych <= ' ') goto yy688;
@@ -12533,7 +12533,7 @@ yy694:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy681;
+ if (yych == '\t') goto yy681;
if (yych <= 0x1F) goto yy671;
goto yy681;
} else {
@@ -12607,7 +12607,7 @@ yy701:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy703;
- if (yych == 0x09) goto yy703;
+ if (yych == '\t') goto yy703;
goto yy54;
} else {
if (yych <= ' ') goto yy703;
@@ -12615,7 +12615,7 @@ yy701:
}
YYDEBUG(702, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy703;
if (yych <= 0x08) goto yy54;
} else {
@@ -12680,7 +12680,7 @@ yy708:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
if (yych <= 0x00) goto yy668;
- if (yych == 0x09) goto yy668;
+ if (yych == '\t') goto yy668;
goto yy54;
} else {
if (yych <= ' ') goto yy668;
@@ -12688,7 +12688,7 @@ yy708:
}
YYDEBUG(709, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x00) goto yy668;
if (yych <= 0x08) goto yy54;
goto yy668;
@@ -12707,7 +12707,7 @@ yy711:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych != 0x09) goto yy656;
+ if (yych != '\t') goto yy656;
} else {
if (yych <= ' ') goto yy712;
if (yych <= ',') goto yy656;
@@ -12731,7 +12731,7 @@ yy712:
yy713:
YYDEBUG(713, *YYCURSOR);
if (yych <= ' ') {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
if (yych <= 0x1F) goto yy54;
goto yy712;
} else {
@@ -12789,7 +12789,7 @@ yy720:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ' ') {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
if (yych <= 0x1F) goto yy656;
goto yy712;
} else {
@@ -12826,7 +12826,7 @@ yy725:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -12876,7 +12876,7 @@ yy731:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -12905,7 +12905,7 @@ yy733:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -12960,7 +12960,7 @@ yy738:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -12999,7 +12999,7 @@ yy742:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13023,7 +13023,7 @@ yy743:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13046,7 +13046,7 @@ yy744:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -13068,7 +13068,7 @@ yy745:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -13088,7 +13088,7 @@ yy745:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -13110,7 +13110,7 @@ yy747:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -13231,7 +13231,7 @@ yy758:
YYDEBUG(758, *YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ':
case '-':
case '.': goto yy757;
@@ -13267,7 +13267,7 @@ yy760:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13316,7 +13316,7 @@ yy766:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13339,7 +13339,7 @@ yy767:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13398,7 +13398,7 @@ yy773:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13432,7 +13432,7 @@ yy776:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13558,7 +13558,7 @@ yy791:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy681;
+ if (yych == '\t') goto yy681;
if (yych <= 0x1F) goto yy671;
goto yy681;
} else {
@@ -13593,7 +13593,7 @@ yy793:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy688;
+ if (yych == '\t') goto yy688;
if (yych <= 0x1F) goto yy671;
goto yy688;
} else {
@@ -13622,7 +13622,7 @@ yy794:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy688;
+ if (yych == '\t') goto yy688;
if (yych <= 0x1F) goto yy671;
goto yy688;
} else {
@@ -13758,7 +13758,7 @@ yy807:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13820,7 +13820,7 @@ yy814:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13850,7 +13850,7 @@ yy816:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13880,7 +13880,7 @@ yy818:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13904,7 +13904,7 @@ yy819:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13940,7 +13940,7 @@ yy822:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -13965,7 +13965,7 @@ yy823:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -14005,7 +14005,7 @@ yy825:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -14029,7 +14029,7 @@ yy826:
yyaccept = 12;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ',') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy656;
goto yy712;
} else {
@@ -14057,7 +14057,7 @@ yy828:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -14103,7 +14103,7 @@ yy831:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -14128,7 +14128,7 @@ yy832:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -14153,7 +14153,7 @@ yy833:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy712;
+ if (yych == '\t') goto yy712;
goto yy656;
} else {
if (yych <= ' ') goto yy712;
@@ -14519,7 +14519,7 @@ yy873:
yy874:
YYDEBUG(874, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 0x09) goto yy875;
+ if (yych == '\t') goto yy875;
if (yych != ' ') goto yy54;
yy875:
YYDEBUG(875, *YYCURSOR);
@@ -14528,7 +14528,7 @@ yy875:
yych = *YYCURSOR;
YYDEBUG(876, *YYCURSOR);
if (yych <= '*') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy54;
goto yy875;
} else {
@@ -14761,7 +14761,7 @@ yy908:
YYDEBUG(908, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= ',') {
- if (yych == 0x09) goto yy910;
+ if (yych == '\t') goto yy910;
goto yy758;
} else {
if (yych <= '.') goto yy910;
@@ -15241,7 +15241,7 @@ yy956:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ':
case 'A':
case 'D':
@@ -15395,7 +15395,7 @@ yy964:
YYDEBUG(964, *YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ': goto yy963;
case '-':
case '.': goto yy1111;
@@ -15744,7 +15744,7 @@ yy994:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych >= ' ') goto yy58;
} else {
if (yych == 'D') goto yy58;
@@ -15943,7 +15943,7 @@ yy1018:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy995;
goto yy58;
} else {
@@ -16006,7 +16006,7 @@ yy1019:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy995;
goto yy58;
} else {
@@ -16069,7 +16069,7 @@ yy1020:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy995;
goto yy58;
} else {
@@ -16138,7 +16138,7 @@ yy1021:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy57;
+ if (yych == '\t') goto yy57;
if (yych >= ' ') goto yy57;
} else {
if (yych == 'D') goto yy62;
@@ -16783,7 +16783,7 @@ yy1112:
YYDEBUG(1112, *YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ':
case '-':
case '.': goto yy1111;
@@ -17774,7 +17774,7 @@ yy1221:
YYDEBUG(1221, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy758;
goto yy910;
} else {
@@ -17812,7 +17812,7 @@ yy1223:
yych = *++YYCURSOR;
if (yych <= '9') {
if (yych <= ',') {
- if (yych == 0x09) goto yy1225;
+ if (yych == '\t') goto yy1225;
goto yy1227;
} else {
if (yych <= '-') goto yy1224;
@@ -17881,7 +17881,7 @@ yy1227:
YYDEBUG(1227, *YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ': goto yy1226;
case '-':
case '.': goto yy757;
@@ -18038,7 +18038,7 @@ yy1236:
yych = *++YYCURSOR;
if (yych <= '9') {
if (yych <= '-') {
- if (yych == 0x09) goto yy1225;
+ if (yych == '\t') goto yy1225;
if (yych <= ',') goto yy1227;
goto yy1224;
} else {
@@ -18089,7 +18089,7 @@ yy1239:
yych = *(YYMARKER = ++YYCURSOR);
YYDEBUG(-1, yych);
switch (yych) {
- case 0x09:
+ case '\t':
case ' ':
case 'A':
case 'D':
@@ -18210,7 +18210,7 @@ yy1248:
if (yych <= 'W') {
if (yych <= 'F') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych >= ' ') goto yy58;
} else {
if (yych == 'D') goto yy58;
@@ -18277,7 +18277,7 @@ yy1250:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy1249;
goto yy58;
} else {
@@ -18340,7 +18340,7 @@ yy1251:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy1249;
goto yy58;
} else {
@@ -18407,7 +18407,7 @@ yy1252:
if (yych <= 'V') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy1249;
goto yy58;
} else {
@@ -18470,7 +18470,7 @@ yy1253:
if (yych <= 'T') {
if (yych <= '9') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy1249;
goto yy58;
} else {
@@ -18546,7 +18546,7 @@ yy1254:
if (yych <= 'T') {
if (yych <= '9') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy1249;
goto yy58;
} else {
@@ -18622,7 +18622,7 @@ yy1255:
if (yych <= 'T') {
if (yych <= '9') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy58;
+ if (yych == '\t') goto yy58;
if (yych <= 0x1F) goto yy1249;
goto yy58;
} else {
@@ -18827,7 +18827,7 @@ yy1269:
yych = *++YYCURSOR;
if (yych <= '9') {
if (yych <= '-') {
- if (yych == 0x09) goto yy640;
+ if (yych == '\t') goto yy640;
if (yych <= ',') goto yy642;
goto yy1224;
} else {
@@ -18853,7 +18853,7 @@ yy1270:
yych = *++YYCURSOR;
if (yych <= '9') {
if (yych <= '-') {
- if (yych == 0x09) goto yy1225;
+ if (yych == '\t') goto yy1225;
if (yych <= ',') goto yy1227;
goto yy1224;
} else {
@@ -18923,7 +18923,7 @@ yy1273:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy3;
goto yy272;
} else {
@@ -19054,7 +19054,7 @@ yy1284:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy272;
+ if (yych == '\t') goto yy272;
goto yy3;
} else {
if (yych <= ' ') goto yy1274;
@@ -19389,7 +19389,7 @@ yy1299:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy3;
goto yy171;
} else {
@@ -19448,7 +19448,7 @@ yy1306:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -19910,7 +19910,7 @@ yy1325:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy171;
+ if (yych == '\t') goto yy171;
goto yy3;
} else {
if (yych <= ' ') goto yy1300;
@@ -19936,7 +19936,7 @@ yy1326:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -20062,7 +20062,7 @@ yy1331:
yy1332:
YYDEBUG(1332, *YYCURSOR);
++YYCURSOR;
- if (YYLIMIT == YYCURSOR) YYFILL(1);
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
YYDEBUG(1333, *YYCURSOR);
if (yych <= '/') goto yy1334;
@@ -20659,7 +20659,7 @@ yy1371:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy3;
goto yy272;
} else {
@@ -21407,7 +21407,7 @@ yy1403:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= 0x1F) {
- if (yych == 0x09) goto yy272;
+ if (yych == '\t') goto yy272;
goto yy3;
} else {
if (yych <= ' ') goto yy272;
@@ -21778,7 +21778,7 @@ yy1422:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -21821,7 +21821,7 @@ yy1423:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '-') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy315;
goto yy317;
} else {
@@ -22150,7 +22150,7 @@ yy1437:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -22195,7 +22195,7 @@ yy1438:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '.') {
if (yych <= ' ') {
- if (yych == 0x09) goto yy317;
+ if (yych == '\t') goto yy317;
if (yych <= 0x1F) goto yy315;
goto yy317;
} else {
@@ -22444,7 +22444,7 @@ yy1449:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
@@ -22789,7 +22789,7 @@ yy1464:
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') {
if (yych <= '(') {
- if (yych <= 0x09) {
+ if (yych <= '\t') {
if (yych <= 0x08) goto yy315;
goto yy317;
} else {
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index b1e3fe3baf..c96d61dc44 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -106,8 +106,8 @@ typedef unsigned char uchar;
#define TIMELIB_HAVE_DATE() { if (s->time->have_date) { add_error(s, "Double date specification"); timelib_string_free(str); return TIMELIB_ERROR; } else { s->time->have_date = 1; } }
#define TIMELIB_UNHAVE_DATE() { s->time->have_date = 0; s->time->d = 0; s->time->m = 0; s->time->y = 0; }
#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; }
-#define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_weekday_relative = 1; }
-#define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_special_relative = 1; }
+#define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_weekday_relative = 1; }
+#define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_special_relative = 1; }
#define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { s->time->have_zone > 1 ? add_error(s, "Double timezone specification") : add_warning(s, "Double timezone specification"); timelib_string_free(str); s->time->have_zone++; return TIMELIB_ERROR; } else { s->time->have_zone++; } }
#define TIMELIB_INIT s->cur = cursor; str = timelib_string(s); ptr = str
@@ -679,8 +679,8 @@ static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, S
case TIMELIB_SPECIAL:
TIMELIB_HAVE_SPECIAL_RELATIVE();
TIMELIB_UNHAVE_TIME();
- s->time->special.type = relunit->multiplier;
- s->time->special.amount = amount;
+ s->time->relative.special.type = relunit->multiplier;
+ s->time->relative.special.amount = amount;
}
}
@@ -1500,8 +1500,8 @@ relativetextweek = reltexttext space 'week';
if (s->time->relative.weekday == 0) {
s->time->relative.weekday = -7;
}
- if (s->time->have_special_relative && s->time->special.type == TIMELIB_SPECIAL_WEEKDAY) {
- s->time->special.amount = 0 - s->time->special.amount;
+ if (s->time->relative.have_special_relative && s->time->relative.special.type == TIMELIB_SPECIAL_WEEKDAY) {
+ s->time->relative.special.amount = 0 - s->time->relative.special.amount;
}
TIMELIB_DEINIT;
return TIMELIB_AGO;
@@ -1540,7 +1540,7 @@ relativetextweek = reltexttext space 'week';
s->time->relative.weekday_behavior = 2;
/* to handle the format weekday + last/this/next week */
- if (s->time->have_weekday_relative == 0) {
+ if (s->time->relative.have_weekday_relative == 0) {
TIMELIB_HAVE_WEEKDAY_RELATIVE();
s->time->relative.weekday = 1;
}
diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c
index 7dd746eb99..00868a2c03 100644
--- a/ext/date/lib/timelib.c
+++ b/ext/date/lib/timelib.c
@@ -234,15 +234,15 @@ void timelib_dump_date(timelib_time *d, int options)
break;
}
}
- }
- if (d->have_weekday_relative) {
- printf(" / %d.%d", d->relative.weekday, d->relative.weekday_behavior);
- }
- if (d->have_special_relative) {
- switch (d->special.type) {
- case TIMELIB_SPECIAL_WEEKDAY:
- printf(" / %lld weekday", d->special.amount);
- break;
+ if (d->relative.have_weekday_relative) {
+ printf(" / %d.%d", d->relative.weekday, d->relative.weekday_behavior);
+ }
+ if (d->relative.have_special_relative) {
+ switch (d->relative.special.type) {
+ case TIMELIB_SPECIAL_WEEKDAY:
+ printf(" / %lld weekday", d->relative.special.amount);
+ break;
+ }
}
}
}
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index 1aeabd4712..63b6c91b94 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -116,6 +116,11 @@ typedef struct timelib_tzinfo
tlinfo *leap_times;
} timelib_tzinfo;
+typedef struct timelib_special {
+ unsigned int type;
+ timelib_sll amount;
+} timelib_special;
+
typedef struct timelib_rel_time {
timelib_sll y, m, d; /* Years, Months and Days */
timelib_sll h, i, s; /* Hours, mInutes and Seconds */
@@ -126,6 +131,9 @@ typedef struct timelib_rel_time {
int first_last_day_of;
int invert; /* Whether the difference should be inverted */
timelib_sll days; /* Contains the number of *days*, instead of Y-M-D differences */
+
+ timelib_special special;
+ unsigned int have_weekday_relative, have_special_relative;
} timelib_rel_time;
typedef struct timelib_time_offset {
@@ -136,11 +144,6 @@ typedef struct timelib_time_offset {
timelib_sll transistion_time;
} timelib_time_offset;
-typedef struct timelib_special {
- unsigned int type;
- timelib_sll amount;
-} timelib_special;
-
typedef struct timelib_time {
timelib_sll y, m, d; /* Year, Month, Day */
timelib_sll h, i, s; /* Hour, mInute, Second */
@@ -150,11 +153,10 @@ typedef struct timelib_time {
timelib_tzinfo *tz_info; /* Timezone structure */
signed int dst; /* Flag if we were parsing a DST zone */
timelib_rel_time relative;
- timelib_special special;
timelib_sll sse; /* Seconds since epoch */
- unsigned int have_time, have_date, have_zone, have_relative, have_weekday_relative, have_special_relative, have_weeknr_day;
+ unsigned int have_time, have_date, have_zone, have_relative, have_weeknr_day;
unsigned int sse_uptodate; /* !0 if the sse member is up to date with the date/time members */
unsigned int tim_uptodate; /* !0 if the date/time members are up to date with the sse member */
diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c
index 83f936f437..a78d6ec78f 100644
--- a/ext/date/lib/tm2unixtime.c
+++ b/ext/date/lib/tm2unixtime.c
@@ -142,7 +142,7 @@ static void do_adjust_for_weekday(timelib_time* time)
} else {
time->d -= (7 - (abs(time->relative.weekday) - current_dow));
}
- time->have_weekday_relative = 0;
+ time->relative.have_weekday_relative = 0;
}
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
@@ -169,7 +169,7 @@ static void do_normalize(timelib_time* time)
static void do_adjust_relative(timelib_time* time)
{
- if (time->have_weekday_relative) {
+ if (time->relative.have_weekday_relative) {
do_adjust_for_weekday(time);
}
do_normalize(time);
@@ -203,7 +203,7 @@ static void do_adjust_special_weekday(timelib_time* time)
timelib_sll current_dow, this_weekday = 0, count;
current_dow = timelib_day_of_week(time->y, time->m, time->d);
- count = time->special.amount;
+ count = time->relative.special.amount;
if (count == 0) {
if (current_dow == 6) {
this_weekday = 2;
@@ -233,15 +233,15 @@ static void do_adjust_special_weekday(timelib_time* time)
static void do_adjust_special(timelib_time* time)
{
- if (time->have_special_relative) {
- switch (time->special.type) {
+ if (time->relative.have_special_relative) {
+ switch (time->relative.special.type) {
case TIMELIB_SPECIAL_WEEKDAY:
do_adjust_special_weekday(time);
break;
}
}
do_normalize(time);
- memset(&(time->special), 0, sizeof(time->special));
+ memset(&(time->relative.special), 0, sizeof(time->relative.special));
}
static timelib_sll do_years(timelib_sll year)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index cb07c05308..2fe4799249 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2213,7 +2213,7 @@ static int date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
timelib_fill_holes(dateobj->time, now, 0);
timelib_update_ts(dateobj->time, tzi);
- dateobj->time->have_weekday_relative = dateobj->time->have_relative = 0;
+ dateobj->time->have_relative = 0;
if (type == TIMELIB_ZONETYPE_ID && now->tz_info != tzi) {
timelib_tzinfo_dtor(now->tz_info);
@@ -2453,28 +2453,24 @@ void php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAMETERS, timelib_time *
break;
}
}
- if (parsed_time->have_relative || parsed_time->have_weekday_relative || parsed_time->have_special_relative || parsed_time->relative.first_last_day_of) {
+ if (parsed_time->have_relative) {
MAKE_STD_ZVAL(element);
array_init(element);
- }
- if (parsed_time->have_relative) {
add_assoc_long(element, "year", parsed_time->relative.y);
add_assoc_long(element, "month", parsed_time->relative.m);
add_assoc_long(element, "day", parsed_time->relative.d);
add_assoc_long(element, "hour", parsed_time->relative.h);
add_assoc_long(element, "minute", parsed_time->relative.i);
add_assoc_long(element, "second", parsed_time->relative.s);
- }
- if (parsed_time->have_weekday_relative) {
- add_assoc_long(element, "weekday", parsed_time->relative.weekday);
- }
- if (parsed_time->have_special_relative && (parsed_time->special.type == TIMELIB_SPECIAL_WEEKDAY)) {
- add_assoc_long(element, "weekdays", parsed_time->special.amount);
- }
- if (parsed_time->relative.first_last_day_of) {
- add_assoc_bool(element, parsed_time->relative.first_last_day_of == 1 ? "first_day_of_month" : "last_day_of_month", 1);
- }
- if (parsed_time->have_relative || parsed_time->have_weekday_relative || parsed_time->have_special_relative || parsed_time->relative.first_last_day_of) {
+ if (parsed_time->relative.have_weekday_relative) {
+ add_assoc_long(element, "weekday", parsed_time->relative.weekday);
+ }
+ if (parsed_time->relative.have_special_relative && (parsed_time->relative.special.type == TIMELIB_SPECIAL_WEEKDAY)) {
+ add_assoc_long(element, "weekdays", parsed_time->relative.special.amount);
+ }
+ if (parsed_time->relative.first_last_day_of) {
+ add_assoc_bool(element, parsed_time->relative.first_last_day_of == 1 ? "first_day_of_month" : "last_day_of_month", 1);
+ }
add_assoc_zval(return_value, "relative", element);
}
timelib_time_dtor(parsed_time);
@@ -2563,7 +2559,7 @@ PHP_FUNCTION(date_modify)
dateobj->time->relative.s = tmp_time->relative.s;
dateobj->time->relative.weekday = tmp_time->relative.weekday;
dateobj->time->have_relative = tmp_time->have_relative;
- dateobj->time->have_weekday_relative = tmp_time->have_weekday_relative;
+ dateobj->time->relative.have_weekday_relative = tmp_time->relative.have_weekday_relative;
dateobj->time->sse_uptodate = 0;
timelib_time_dtor(tmp_time);
@@ -2600,9 +2596,9 @@ PHP_FUNCTION(date_add)
dateobj->time->relative.h = intobj->diff->h * bias;
dateobj->time->relative.i = intobj->diff->i * bias;
dateobj->time->relative.s = intobj->diff->s * bias;
- dateobj->time->relative.weekday = 0;
dateobj->time->have_relative = 1;
- dateobj->time->have_weekday_relative = 0;
+ dateobj->time->relative.weekday = 0;
+ dateobj->time->relative.have_weekday_relative = 0;
dateobj->time->sse_uptodate = 0;
timelib_update_ts(dateobj->time, NULL);
@@ -2638,9 +2634,9 @@ PHP_FUNCTION(date_sub)
dateobj->time->relative.h = 0 - (intobj->diff->h * bias);
dateobj->time->relative.i = 0 - (intobj->diff->i * bias);
dateobj->time->relative.s = 0 - (intobj->diff->s * bias);
- dateobj->time->relative.weekday = 0;
dateobj->time->have_relative = 1;
- dateobj->time->have_weekday_relative = 0;
+ dateobj->time->relative.weekday = 0;
+ dateobj->time->relative.have_weekday_relative = 0;
dateobj->time->sse_uptodate = 0;
timelib_update_ts(dateobj->time, NULL);