-/* Generated by re2c 0.13.5 on Thu Jul 31 14:33:37 2014 */
+/* Generated by re2c 0.13.5 on Sun Aug 17 11:08:33 2014 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
}
}
-const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, int isdst)
+const static timelib_tz_lookup_table* abbr_search(const char *word, long gmtoffset, int isdst)
{
int first_found = 0;
const timelib_tz_lookup_table *tp, *first_found_elem = NULL;
return first_found_elem;
}
- for (tp = timelib_timezone_lookup; tp->name; tp++) {
- if (tp->full_tz_name && strcasecmp(word, tp->full_tz_name) == 0) {
- if (!first_found) {
- first_found = 1;
- first_found_elem = tp;
- if (gmtoffset == -1) {
- return tp;
- }
- }
- if (tp->gmtoffset == gmtoffset) {
- return tp;
- }
- }
- }
- if (first_found) {
- return first_found_elem;
- }
-
-
/* Still didn't find anything, let's find the zone solely based on
* offset/isdst then */
for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) {
return NULL;
}
-static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found)
+static long timelib_lookup_abbr(char **ptr, int *dst, char **tz_abbr, int *found)
{
char *word;
char *begin = *ptr, *end;
word = calloc(1, end - begin + 1);
memcpy(word, begin, end - begin);
- if ((tp = zone_search(word, -1, 0))) {
+ if ((tp = abbr_search(word, -1, 0))) {
value = -tp->gmtoffset / 60;
*dst = tp->type;
value += tp->type * 60;
retval = timelib_parse_tz_cor(ptr);
} else {
int found = 0;
- long offset;
+ long offset = 0;
char *tz_abbr;
t->is_localtime = 1;
- offset = timelib_lookup_zone(ptr, dst, &tz_abbr, &found);
+ /* First, we lookup by abbreviation only */
+ offset = timelib_lookup_abbr(ptr, dst, &tz_abbr, &found);
if (found) {
t->zone_type = TIMELIB_ZONETYPE_ABBR;
+ timelib_time_tz_abbr_update(t, tz_abbr);
}
-#if 0
- /* If we found a TimeZone identifier, use it */
- if (tz_name) {
- t->tz_info = timelib_parse_tzfile(tz_name);
- t->zone_type = TIMELIB_ZONETYPE_ID;
- }
-#endif
- /* If we have a TimeZone identifier to start with, use it */
- if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) {
+
+ /* Otherwise, we look if we have a TimeZone identifier */
+ if (!found || strcmp("UTC", tz_abbr) == 0) {
if ((res = tz_wrapper(tz_abbr, tzdb)) != NULL) {
t->tz_info = res;
t->zone_type = TIMELIB_ZONETYPE_ID;
found++;
}
}
- if (found && t->zone_type != TIMELIB_ZONETYPE_ID) {
- timelib_time_tz_abbr_update(t, tz_abbr);
- }
free(tz_abbr);
*tz_not_found = (found == 0);
retval = offset;
std:
s->tok = cursor;
s->len = 0;
-#line 966 "ext/date/lib/parse_date.re"
+#line 940 "ext/date/lib/parse_date.re"
-#line 848 "ext/date/lib/parse_date.c"
+#line 822 "ext/date/lib/parse_date.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1646 "ext/date/lib/parse_date.re"
+#line 1620 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 1001 "ext/date/lib/parse_date.c"
+#line 975 "ext/date/lib/parse_date.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy1385;
yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1741 "ext/date/lib/parse_date.re"
+#line 1715 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 1317 "ext/date/lib/parse_date.c"
+#line 1291 "ext/date/lib/parse_date.c"
yy13:
YYDEBUG(13, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy54;
yy49:
YYDEBUG(49, *YYCURSOR);
-#line 1730 "ext/date/lib/parse_date.re"
+#line 1704 "ext/date/lib/parse_date.re"
{
goto std;
}
-#line 2378 "ext/date/lib/parse_date.c"
+#line 2352 "ext/date/lib/parse_date.c"
yy50:
YYDEBUG(50, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(51, *YYCURSOR);
++YYCURSOR;
YYDEBUG(52, *YYCURSOR);
-#line 1735 "ext/date/lib/parse_date.re"
+#line 1709 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 2392 "ext/date/lib/parse_date.c"
+#line 2366 "ext/date/lib/parse_date.c"
yy53:
YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 's') goto yy73;
yy72:
YYDEBUG(72, *YYCURSOR);
-#line 1714 "ext/date/lib/parse_date.re"
+#line 1688 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2794 "ext/date/lib/parse_date.c"
+#line 2768 "ext/date/lib/parse_date.c"
yy73:
YYDEBUG(73, *YYCURSOR);
yych = *++YYCURSOR;
}
yy166:
YYDEBUG(166, *YYCURSOR);
-#line 1577 "ext/date/lib/parse_date.re"
+#line 1551 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
-#line 3573 "ext/date/lib/parse_date.c"
+#line 3547 "ext/date/lib/parse_date.c"
yy167:
YYDEBUG(167, *YYCURSOR);
yych = *++YYCURSOR;
}
yy193:
YYDEBUG(193, *YYCURSOR);
-#line 1636 "ext/date/lib/parse_date.re"
+#line 1610 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4102 "ext/date/lib/parse_date.c"
+#line 4076 "ext/date/lib/parse_date.c"
yy194:
YYDEBUG(194, *YYCURSOR);
++YYCURSOR;
}
yy198:
YYDEBUG(198, *YYCURSOR);
-#line 1382 "ext/date/lib/parse_date.re"
+#line 1356 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4166 "ext/date/lib/parse_date.c"
+#line 4140 "ext/date/lib/parse_date.c"
yy199:
YYDEBUG(199, *YYCURSOR);
yyaccept = 6;
}
yy222:
YYDEBUG(222, *YYCURSOR);
-#line 1684 "ext/date/lib/parse_date.re"
+#line 1658 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4464 "ext/date/lib/parse_date.c"
+#line 4438 "ext/date/lib/parse_date.c"
yy223:
YYDEBUG(223, *YYCURSOR);
yyaccept = 7;
YYDEBUG(277, *YYCURSOR);
++YYCURSOR;
YYDEBUG(278, *YYCURSOR);
-#line 1660 "ext/date/lib/parse_date.re"
+#line 1634 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 5185 "ext/date/lib/parse_date.c"
+#line 5159 "ext/date/lib/parse_date.c"
yy279:
YYDEBUG(279, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
yy294:
YYDEBUG(294, *YYCURSOR);
-#line 1354 "ext/date/lib/parse_date.re"
+#line 1328 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 5376 "ext/date/lib/parse_date.c"
+#line 5350 "ext/date/lib/parse_date.c"
yy295:
YYDEBUG(295, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy364;
yy363:
YYDEBUG(363, *YYCURSOR);
-#line 1498 "ext/date/lib/parse_date.re"
+#line 1472 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 6609 "ext/date/lib/parse_date.c"
+#line 6583 "ext/date/lib/parse_date.c"
yy364:
YYDEBUG(364, *YYCURSOR);
yych = *++YYCURSOR;
}
yy392:
YYDEBUG(392, *YYCURSOR);
-#line 1556 "ext/date/lib/parse_date.re"
+#line 1530 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 7267 "ext/date/lib/parse_date.c"
+#line 7241 "ext/date/lib/parse_date.c"
yy393:
YYDEBUG(393, *YYCURSOR);
yyaccept = 5;
++YYCURSOR;
yy454:
YYDEBUG(454, *YYCURSOR);
-#line 1259 "ext/date/lib/parse_date.re"
+#line 1233 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 9028 "ext/date/lib/parse_date.c"
+#line 9002 "ext/date/lib/parse_date.c"
yy455:
YYDEBUG(455, *YYCURSOR);
yyaccept = 0;
}
yy475:
YYDEBUG(475, *YYCURSOR);
-#line 1396 "ext/date/lib/parse_date.re"
+#line 1370 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 9599 "ext/date/lib/parse_date.c"
+#line 9573 "ext/date/lib/parse_date.c"
yy476:
YYDEBUG(476, *YYCURSOR);
yyaccept = 10;
YYDEBUG(487, *YYCURSOR);
++YYCURSOR;
YYDEBUG(488, *YYCURSOR);
-#line 1114 "ext/date/lib/parse_date.re"
+#line 1088 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 9756 "ext/date/lib/parse_date.c"
+#line 9730 "ext/date/lib/parse_date.c"
yy489:
YYDEBUG(489, *YYCURSOR);
yyaccept = 11;
}
yy490:
YYDEBUG(490, *YYCURSOR);
-#line 1151 "ext/date/lib/parse_date.re"
+#line 1125 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9794 "ext/date/lib/parse_date.c"
+#line 9768 "ext/date/lib/parse_date.c"
yy491:
YYDEBUG(491, *YYCURSOR);
yyaccept = 11;
YYDEBUG(522, *YYCURSOR);
++YYCURSOR;
YYDEBUG(523, *YYCURSOR);
-#line 1131 "ext/date/lib/parse_date.re"
+#line 1105 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 10123 "ext/date/lib/parse_date.c"
+#line 10097 "ext/date/lib/parse_date.c"
yy524:
YYDEBUG(524, *YYCURSOR);
yyaccept = 11;
if (yych <= '9') goto yy540;
yy534:
YYDEBUG(534, *YYCURSOR);
-#line 1313 "ext/date/lib/parse_date.re"
+#line 1287 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 10243 "ext/date/lib/parse_date.c"
+#line 10217 "ext/date/lib/parse_date.c"
yy535:
YYDEBUG(535, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(605, *YYCURSOR);
++YYCURSOR;
YYDEBUG(606, *YYCURSOR);
-#line 1328 "ext/date/lib/parse_date.re"
+#line 1302 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10991 "ext/date/lib/parse_date.c"
+#line 10965 "ext/date/lib/parse_date.c"
yy607:
YYDEBUG(607, *YYCURSOR);
yyaccept = 11;
if (yych <= '9') goto yy604;
yy611:
YYDEBUG(611, *YYCURSOR);
-#line 1340 "ext/date/lib/parse_date.re"
+#line 1314 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 11040 "ext/date/lib/parse_date.c"
+#line 11014 "ext/date/lib/parse_date.c"
yy612:
YYDEBUG(612, *YYCURSOR);
yyaccept = 11;
}
yy656:
YYDEBUG(656, *YYCURSOR);
-#line 1299 "ext/date/lib/parse_date.re"
+#line 1273 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11694 "ext/date/lib/parse_date.c"
+#line 11668 "ext/date/lib/parse_date.c"
yy657:
YYDEBUG(657, *YYCURSOR);
yyaccept = 13;
}
yy666:
YYDEBUG(666, *YYCURSOR);
-#line 1243 "ext/date/lib/parse_date.re"
+#line 1217 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 11815 "ext/date/lib/parse_date.c"
+#line 11789 "ext/date/lib/parse_date.c"
yy667:
YYDEBUG(667, *YYCURSOR);
yyaccept = 14;
if (yych <= ':') goto yy703;
yy700:
YYDEBUG(700, *YYCURSOR);
-#line 1526 "ext/date/lib/parse_date.re"
+#line 1500 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12068 "ext/date/lib/parse_date.c"
+#line 12042 "ext/date/lib/parse_date.c"
yy701:
YYDEBUG(701, *YYCURSOR);
yych = *++YYCURSOR;
}
yy763:
YYDEBUG(763, *YYCURSOR);
-#line 1271 "ext/date/lib/parse_date.re"
+#line 1245 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 12633 "ext/date/lib/parse_date.c"
+#line 12607 "ext/date/lib/parse_date.c"
yy764:
YYDEBUG(764, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(770, *YYCURSOR);
++YYCURSOR;
YYDEBUG(771, *YYCURSOR);
-#line 1512 "ext/date/lib/parse_date.re"
+#line 1486 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 12685 "ext/date/lib/parse_date.c"
+#line 12659 "ext/date/lib/parse_date.c"
yy772:
YYDEBUG(772, *YYCURSOR);
yych = *++YYCURSOR;
}
yy783:
YYDEBUG(783, *YYCURSOR);
-#line 1547 "ext/date/lib/parse_date.re"
+#line 1521 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12831 "ext/date/lib/parse_date.c"
+#line 12805 "ext/date/lib/parse_date.c"
yy784:
YYDEBUG(784, *YYCURSOR);
yych = *++YYCURSOR;
}
yy793:
YYDEBUG(793, *YYCURSOR);
-#line 1368 "ext/date/lib/parse_date.re"
+#line 1342 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 12995 "ext/date/lib/parse_date.c"
+#line 12969 "ext/date/lib/parse_date.c"
yy794:
YYDEBUG(794, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '7') goto yy816;
yy814:
YYDEBUG(814, *YYCURSOR);
-#line 1479 "ext/date/lib/parse_date.re"
+#line 1453 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13228 "ext/date/lib/parse_date.c"
+#line 13202 "ext/date/lib/parse_date.c"
yy815:
YYDEBUG(815, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(816, *YYCURSOR);
++YYCURSOR;
YYDEBUG(817, *YYCURSOR);
-#line 1460 "ext/date/lib/parse_date.re"
+#line 1434 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13256 "ext/date/lib/parse_date.c"
+#line 13230 "ext/date/lib/parse_date.c"
yy818:
YYDEBUG(818, *YYCURSOR);
yych = *++YYCURSOR;
}
yy821:
YYDEBUG(821, *YYCURSOR);
-#line 1446 "ext/date/lib/parse_date.re"
+#line 1420 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 13333 "ext/date/lib/parse_date.c"
+#line 13307 "ext/date/lib/parse_date.c"
yy822:
YYDEBUG(822, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
yy842:
YYDEBUG(842, *YYCURSOR);
-#line 1420 "ext/date/lib/parse_date.re"
+#line 1394 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 13461 "ext/date/lib/parse_date.c"
+#line 13435 "ext/date/lib/parse_date.c"
yy843:
YYDEBUG(843, *YYCURSOR);
yych = *++YYCURSOR;
}
yy848:
YYDEBUG(848, *YYCURSOR);
-#line 1408 "ext/date/lib/parse_date.re"
+#line 1382 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 13734 "ext/date/lib/parse_date.c"
+#line 13708 "ext/date/lib/parse_date.c"
yy849:
YYDEBUG(849, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy995;
yy973:
YYDEBUG(973, *YYCURSOR);
-#line 1285 "ext/date/lib/parse_date.re"
+#line 1259 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 14667 "ext/date/lib/parse_date.c"
+#line 14641 "ext/date/lib/parse_date.c"
yy974:
YYDEBUG(974, *YYCURSOR);
yyaccept = 22;
}
yy1067:
YYDEBUG(1067, *YYCURSOR);
-#line 1177 "ext/date/lib/parse_date.re"
+#line 1151 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 15698 "ext/date/lib/parse_date.c"
+#line 15672 "ext/date/lib/parse_date.c"
yy1068:
YYDEBUG(1068, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1075:
YYDEBUG(1075, *YYCURSOR);
-#line 1223 "ext/date/lib/parse_date.re"
+#line 1197 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 15809 "ext/date/lib/parse_date.c"
+#line 15783 "ext/date/lib/parse_date.c"
yy1076:
YYDEBUG(1076, *YYCURSOR);
yyaccept = 25;
}
yy1117:
YYDEBUG(1117, *YYCURSOR);
-#line 1619 "ext/date/lib/parse_date.re"
+#line 1593 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16723 "ext/date/lib/parse_date.c"
+#line 16697 "ext/date/lib/parse_date.c"
yy1118:
YYDEBUG(1118, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1125, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1126, *YYCURSOR);
-#line 1092 "ext/date/lib/parse_date.re"
+#line 1066 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
-#line 16795 "ext/date/lib/parse_date.c"
+#line 16769 "ext/date/lib/parse_date.c"
yy1127:
YYDEBUG(1127, *YYCURSOR);
yyaccept = 26;
}
yy1141:
YYDEBUG(1141, *YYCURSOR);
-#line 1595 "ext/date/lib/parse_date.re"
+#line 1569 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16926 "ext/date/lib/parse_date.c"
+#line 16900 "ext/date/lib/parse_date.c"
yy1142:
YYDEBUG(1142, *YYCURSOR);
yych = *++YYCURSOR;
goto yy1297;
yy1294:
YYDEBUG(1294, *YYCURSOR);
-#line 1069 "ext/date/lib/parse_date.re"
+#line 1043 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19625 "ext/date/lib/parse_date.c"
+#line 19599 "ext/date/lib/parse_date.c"
yy1295:
YYDEBUG(1295, *YYCURSOR);
yyaccept = 28;
YYDEBUG(1315, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1316, *YYCURSOR);
-#line 1052 "ext/date/lib/parse_date.re"
+#line 1026 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19902 "ext/date/lib/parse_date.c"
+#line 19876 "ext/date/lib/parse_date.c"
yy1317:
YYDEBUG(1317, *YYCURSOR);
yyaccept = 0;
if (yych <= '9') goto yy1385;
yy1387:
YYDEBUG(1387, *YYCURSOR);
-#line 1026 "ext/date/lib/parse_date.re"
+#line 1000 "ext/date/lib/parse_date.re"
{
timelib_ull i;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21358 "ext/date/lib/parse_date.c"
+#line 21332 "ext/date/lib/parse_date.c"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
-#line 1014 "ext/date/lib/parse_date.re"
+#line 988 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21805 "ext/date/lib/parse_date.c"
+#line 21779 "ext/date/lib/parse_date.c"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
-#line 1004 "ext/date/lib/parse_date.re"
+#line 978 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21849 "ext/date/lib/parse_date.c"
+#line 21823 "ext/date/lib/parse_date.c"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
-#line 983 "ext/date/lib/parse_date.re"
+#line 957 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 23869 "ext/date/lib/parse_date.c"
+#line 23843 "ext/date/lib/parse_date.c"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
-#line 992 "ext/date/lib/parse_date.re"
+#line 966 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24019 "ext/date/lib/parse_date.c"
+#line 23993 "ext/date/lib/parse_date.c"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
-#line 971 "ext/date/lib/parse_date.re"
+#line 945 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24563 "ext/date/lib/parse_date.c"
+#line 24537 "ext/date/lib/parse_date.c"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
goto yy1531;
}
}
-#line 1745 "ext/date/lib/parse_date.re"
+#line 1719 "ext/date/lib/parse_date.re"
}
{
const timelib_tz_lookup_table *tp;
- tp = zone_search(abbr, gmtoffset, isdst);
+ tp = abbr_search(abbr, gmtoffset, isdst);
if (tp) {
return (tp->full_tz_name);
} else {