?? ??? ????, PHP 7.3.0RC4
- Date:
- . Updated timelib to 2018.01alpha2 to address several bugs: (Derick)
+ . Updated timelib to 2018.01RC1 to address several bugs: (Derick)
. Fixed bug #75577 (DateTime::createFromFormat does not accept 'v' format
specifier). (Derick)
. Fixed bug #75642 (Wrap around behaviour for microseconds is not working).
(Derick)
+ . Fixed bug #77007 (fractions in `diff()` are not correctly normalized).
+ (Derick)
- Tokenizer:
. Fixed bug #76991 (Incorrect tokenization of multiple invalid flexible
-/* Generated by re2c 0.15.3 on Tue Oct 9 10:50:25 2018 */
+/* Generated by re2c 0.15.3 on Fri Oct 12 10:49:04 2018 */
#line 1 "parse_date.re"
/*
* The MIT License (MIT)
* THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include "timelib_private.h"
std:
s->tok = cursor;
s->len = 0;
-#line 1012 "parse_date.re"
+#line 1010 "parse_date.re"
-#line 893 "<stdout>"
+#line 891 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1720 "parse_date.re"
+#line 1718 "parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 1044 "<stdout>"
+#line 1042 "<stdout>"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy1377;
yy12:
YYDEBUG(12, *YYCURSOR);
-#line 1815 "parse_date.re"
+#line 1813 "parse_date.re"
{
add_error(s, TIMELIB_ERR_UNEXPECTED_CHARACTER, "Unexpected character");
goto std;
}
-#line 1358 "<stdout>"
+#line 1356 "<stdout>"
yy13:
YYDEBUG(13, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy54;
yy49:
YYDEBUG(49, *YYCURSOR);
-#line 1804 "parse_date.re"
+#line 1802 "parse_date.re"
{
goto std;
}
-#line 2606 "<stdout>"
+#line 2604 "<stdout>"
yy50:
YYDEBUG(50, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(51, *YYCURSOR);
++YYCURSOR;
YYDEBUG(52, *YYCURSOR);
-#line 1809 "parse_date.re"
+#line 1807 "parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 2620 "<stdout>"
+#line 2618 "<stdout>"
yy53:
YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == 's') goto yy75;
yy74:
YYDEBUG(74, *YYCURSOR);
-#line 1788 "parse_date.re"
+#line 1786 "parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 3071 "<stdout>"
+#line 3069 "<stdout>"
yy75:
YYDEBUG(75, *YYCURSOR);
yych = *++YYCURSOR;
}
yy191:
YYDEBUG(191, *YYCURSOR);
-#line 1651 "parse_date.re"
+#line 1649 "parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
-#line 3991 "<stdout>"
+#line 3989 "<stdout>"
yy192:
YYDEBUG(192, *YYCURSOR);
yych = *++YYCURSOR;
}
yy218:
YYDEBUG(218, *YYCURSOR);
-#line 1710 "parse_date.re"
+#line 1708 "parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4520 "<stdout>"
+#line 4518 "<stdout>"
yy219:
YYDEBUG(219, *YYCURSOR);
++YYCURSOR;
goto yy237;
yy232:
YYDEBUG(232, *YYCURSOR);
-#line 1456 "parse_date.re"
+#line 1454 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 4782 "<stdout>"
+#line 4780 "<stdout>"
yy233:
YYDEBUG(233, *YYCURSOR);
yyaccept = 6;
}
yy246:
YYDEBUG(246, *YYCURSOR);
-#line 1758 "parse_date.re"
+#line 1756 "parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4938 "<stdout>"
+#line 4936 "<stdout>"
yy247:
YYDEBUG(247, *YYCURSOR);
yyaccept = 7;
YYDEBUG(270, *YYCURSOR);
++YYCURSOR;
YYDEBUG(271, *YYCURSOR);
-#line 1734 "parse_date.re"
+#line 1732 "parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 5259 "<stdout>"
+#line 5257 "<stdout>"
yy272:
YYDEBUG(272, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(321, *YYCURSOR);
++YYCURSOR;
YYDEBUG(322, *YYCURSOR);
-#line 1428 "parse_date.re"
+#line 1426 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 5879 "<stdout>"
+#line 5877 "<stdout>"
yy323:
YYDEBUG(323, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy331;
yy330:
YYDEBUG(330, *YYCURSOR);
-#line 1572 "parse_date.re"
+#line 1570 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 6123 "<stdout>"
+#line 6121 "<stdout>"
yy331:
YYDEBUG(331, *YYCURSOR);
yych = *++YYCURSOR;
}
yy357:
YYDEBUG(357, *YYCURSOR);
-#line 1630 "parse_date.re"
+#line 1628 "parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 6725 "<stdout>"
+#line 6723 "<stdout>"
yy358:
YYDEBUG(358, *YYCURSOR);
yyaccept = 5;
++YYCURSOR;
yy419:
YYDEBUG(419, *YYCURSOR);
-#line 1333 "parse_date.re"
+#line 1331 "parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 8519 "<stdout>"
+#line 8517 "<stdout>"
yy420:
YYDEBUG(420, *YYCURSOR);
yyaccept = 0;
}
yy440:
YYDEBUG(440, *YYCURSOR);
-#line 1470 "parse_date.re"
+#line 1468 "parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 9174 "<stdout>"
+#line 9172 "<stdout>"
yy441:
YYDEBUG(441, *YYCURSOR);
yyaccept = 9;
YYDEBUG(452, *YYCURSOR);
++YYCURSOR;
YYDEBUG(453, *YYCURSOR);
-#line 1188 "parse_date.re"
+#line 1186 "parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 9331 "<stdout>"
+#line 9329 "<stdout>"
yy454:
YYDEBUG(454, *YYCURSOR);
yyaccept = 10;
}
yy455:
YYDEBUG(455, *YYCURSOR);
-#line 1225 "parse_date.re"
+#line 1223 "parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9369 "<stdout>"
+#line 9367 "<stdout>"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 10;
YYDEBUG(487, *YYCURSOR);
++YYCURSOR;
YYDEBUG(488, *YYCURSOR);
-#line 1205 "parse_date.re"
+#line 1203 "parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9698 "<stdout>"
+#line 9696 "<stdout>"
yy489:
YYDEBUG(489, *YYCURSOR);
yyaccept = 10;
if (yych <= '9') goto yy505;
yy499:
YYDEBUG(499, *YYCURSOR);
-#line 1387 "parse_date.re"
+#line 1385 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 9818 "<stdout>"
+#line 9816 "<stdout>"
yy500:
YYDEBUG(500, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(570, *YYCURSOR);
++YYCURSOR;
YYDEBUG(571, *YYCURSOR);
-#line 1402 "parse_date.re"
+#line 1400 "parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10565 "<stdout>"
+#line 10563 "<stdout>"
yy572:
YYDEBUG(572, *YYCURSOR);
yyaccept = 10;
if (yych <= '9') goto yy569;
yy576:
YYDEBUG(576, *YYCURSOR);
-#line 1414 "parse_date.re"
+#line 1412 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10614 "<stdout>"
+#line 10612 "<stdout>"
yy577:
YYDEBUG(577, *YYCURSOR);
yyaccept = 10;
}
yy621:
YYDEBUG(621, *YYCURSOR);
-#line 1373 "parse_date.re"
+#line 1371 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11268 "<stdout>"
+#line 11266 "<stdout>"
yy622:
YYDEBUG(622, *YYCURSOR);
yyaccept = 12;
}
yy631:
YYDEBUG(631, *YYCURSOR);
-#line 1317 "parse_date.re"
+#line 1315 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 11389 "<stdout>"
+#line 11387 "<stdout>"
yy632:
YYDEBUG(632, *YYCURSOR);
yyaccept = 13;
if (yych <= ':') goto yy668;
yy665:
YYDEBUG(665, *YYCURSOR);
-#line 1600 "parse_date.re"
+#line 1598 "parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 11642 "<stdout>"
+#line 11640 "<stdout>"
yy666:
YYDEBUG(666, *YYCURSOR);
yych = *++YYCURSOR;
}
yy728:
YYDEBUG(728, *YYCURSOR);
-#line 1345 "parse_date.re"
+#line 1343 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 12205 "<stdout>"
+#line 12203 "<stdout>"
yy729:
YYDEBUG(729, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(735, *YYCURSOR);
++YYCURSOR;
YYDEBUG(736, *YYCURSOR);
-#line 1586 "parse_date.re"
+#line 1584 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 12257 "<stdout>"
+#line 12255 "<stdout>"
yy737:
YYDEBUG(737, *YYCURSOR);
yych = *++YYCURSOR;
}
yy748:
YYDEBUG(748, *YYCURSOR);
-#line 1621 "parse_date.re"
+#line 1619 "parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12430 "<stdout>"
+#line 12428 "<stdout>"
yy749:
YYDEBUG(749, *YYCURSOR);
yych = *++YYCURSOR;
}
yy758:
YYDEBUG(758, *YYCURSOR);
-#line 1442 "parse_date.re"
+#line 1440 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 12648 "<stdout>"
+#line 12646 "<stdout>"
yy759:
YYDEBUG(759, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '7') goto yy781;
yy779:
YYDEBUG(779, *YYCURSOR);
-#line 1553 "parse_date.re"
+#line 1551 "parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 12887 "<stdout>"
+#line 12885 "<stdout>"
yy780:
YYDEBUG(780, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(781, *YYCURSOR);
++YYCURSOR;
YYDEBUG(782, *YYCURSOR);
-#line 1534 "parse_date.re"
+#line 1532 "parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 12915 "<stdout>"
+#line 12913 "<stdout>"
yy783:
YYDEBUG(783, *YYCURSOR);
yych = *++YYCURSOR;
}
yy786:
YYDEBUG(786, *YYCURSOR);
-#line 1520 "parse_date.re"
+#line 1518 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 12998 "<stdout>"
+#line 12996 "<stdout>"
yy787:
YYDEBUG(787, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
yy807:
YYDEBUG(807, *YYCURSOR);
-#line 1494 "parse_date.re"
+#line 1492 "parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 13126 "<stdout>"
+#line 13124 "<stdout>"
yy808:
YYDEBUG(808, *YYCURSOR);
yych = *++YYCURSOR;
}
yy813:
YYDEBUG(813, *YYCURSOR);
-#line 1482 "parse_date.re"
+#line 1480 "parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 13432 "<stdout>"
+#line 13430 "<stdout>"
yy814:
YYDEBUG(814, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy960;
yy938:
YYDEBUG(938, *YYCURSOR);
-#line 1359 "parse_date.re"
+#line 1357 "parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 14364 "<stdout>"
+#line 14362 "<stdout>"
yy939:
YYDEBUG(939, *YYCURSOR);
yyaccept = 21;
}
yy1032:
YYDEBUG(1032, *YYCURSOR);
-#line 1251 "parse_date.re"
+#line 1249 "parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 15479 "<stdout>"
+#line 15477 "<stdout>"
yy1033:
YYDEBUG(1033, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1040:
YYDEBUG(1040, *YYCURSOR);
-#line 1297 "parse_date.re"
+#line 1295 "parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 15596 "<stdout>"
+#line 15594 "<stdout>"
yy1041:
YYDEBUG(1041, *YYCURSOR);
yyaccept = 24;
}
yy1084:
YYDEBUG(1084, *YYCURSOR);
-#line 1693 "parse_date.re"
+#line 1691 "parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16588 "<stdout>"
+#line 16586 "<stdout>"
yy1085:
YYDEBUG(1085, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1092, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1093, *YYCURSOR);
-#line 1166 "parse_date.re"
+#line 1164 "parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
-#line 16660 "<stdout>"
+#line 16658 "<stdout>"
yy1094:
YYDEBUG(1094, *YYCURSOR);
yyaccept = 25;
}
yy1108:
YYDEBUG(1108, *YYCURSOR);
-#line 1669 "parse_date.re"
+#line 1667 "parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 16791 "<stdout>"
+#line 16789 "<stdout>"
yy1109:
YYDEBUG(1109, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1284:
YYDEBUG(1284, *YYCURSOR);
-#line 1143 "parse_date.re"
+#line 1141 "parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19662 "<stdout>"
+#line 19660 "<stdout>"
yy1285:
YYDEBUG(1285, *YYCURSOR);
yyaccept = 27;
YYDEBUG(1306, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1307, *YYCURSOR);
-#line 1126 "parse_date.re"
+#line 1124 "parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 19977 "<stdout>"
+#line 19975 "<stdout>"
yy1308:
YYDEBUG(1308, *YYCURSOR);
yyaccept = 0;
if (yych <= '9') goto yy1377;
yy1379:
YYDEBUG(1379, *YYCURSOR);
-#line 1072 "parse_date.re"
+#line 1070 "parse_date.re"
{
timelib_ull i;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21491 "<stdout>"
+#line 21489 "<stdout>"
yy1380:
YYDEBUG(1380, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(1386, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1387, *YYCURSOR);
-#line 1098 "parse_date.re"
+#line 1096 "parse_date.re"
{
timelib_ull i, us;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21547 "<stdout>"
+#line 21545 "<stdout>"
yy1388:
YYDEBUG(1388, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
yy1417:
YYDEBUG(1417, *YYCURSOR);
-#line 1060 "parse_date.re"
+#line 1058 "parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 21994 "<stdout>"
+#line 21992 "<stdout>"
yy1418:
YYDEBUG(1418, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1420:
YYDEBUG(1420, *YYCURSOR);
-#line 1050 "parse_date.re"
+#line 1048 "parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 22038 "<stdout>"
+#line 22036 "<stdout>"
yy1421:
YYDEBUG(1421, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1500:
YYDEBUG(1500, *YYCURSOR);
-#line 1029 "parse_date.re"
+#line 1027 "parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24058 "<stdout>"
+#line 24056 "<stdout>"
yy1501:
YYDEBUG(1501, *YYCURSOR);
yych = *++YYCURSOR;
}
yy1508:
YYDEBUG(1508, *YYCURSOR);
-#line 1038 "parse_date.re"
+#line 1036 "parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24208 "<stdout>"
+#line 24206 "<stdout>"
yy1509:
YYDEBUG(1509, *YYCURSOR);
yyaccept = 0;
++YYCURSOR;
yy1531:
YYDEBUG(1531, *YYCURSOR);
-#line 1017 "parse_date.re"
+#line 1015 "parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 24752 "<stdout>"
+#line 24750 "<stdout>"
yy1532:
YYDEBUG(1532, *YYCURSOR);
yyaccept = 0;
goto yy1531;
}
}
-#line 1819 "parse_date.re"
+#line 1817 "parse_date.re"
}
* THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include "timelib_private.h"
-/* Generated by re2c 0.15.3 on Tue Oct 9 10:50:29 2018 */
+/* Generated by re2c 0.15.3 on Fri Oct 12 11:47:32 2018 */
#line 1 "parse_iso_intervals.re"
/*
* The MIT License (MIT)
* THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include "timelib_private.h"
std:
s->tok = cursor;
s->len = 0;
-#line 204 "parse_iso_intervals.re"
+#line 202 "parse_iso_intervals.re"
-#line 184 "<stdout>"
+#line 182 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
if (yych <= '9') goto yy98;
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 317 "parse_iso_intervals.re"
+#line 315 "parse_iso_intervals.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 258 "<stdout>"
+#line 256 "<stdout>"
yy4:
YYDEBUG(4, *YYCURSOR);
yyaccept = 0;
if (yych == 'T') goto yy14;
yy6:
YYDEBUG(6, *YYCURSOR);
-#line 244 "parse_iso_intervals.re"
+#line 242 "parse_iso_intervals.re"
{
timelib_sll nr;
int in_time = 0;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
}
-#line 316 "<stdout>"
+#line 314 "<stdout>"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
YYDEBUG(8, *YYCURSOR);
-#line 306 "parse_iso_intervals.re"
+#line 304 "parse_iso_intervals.re"
{
goto std;
}
-#line 325 "<stdout>"
+#line 323 "<stdout>"
yy9:
YYDEBUG(9, *YYCURSOR);
++YYCURSOR;
YYDEBUG(10, *YYCURSOR);
-#line 311 "parse_iso_intervals.re"
+#line 309 "parse_iso_intervals.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 335 "<stdout>"
+#line 333 "<stdout>"
yy11:
YYDEBUG(11, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(57, *YYCURSOR);
++YYCURSOR;
YYDEBUG(58, *YYCURSOR);
-#line 286 "parse_iso_intervals.re"
+#line 284 "parse_iso_intervals.re"
{
DEBUG_OUTPUT("combinedrep");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_PERIOD;
}
-#line 684 "<stdout>"
+#line 682 "<stdout>"
yy59:
YYDEBUG(59, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(83, *YYCURSOR);
++YYCURSOR;
YYDEBUG(84, *YYCURSOR);
-#line 220 "parse_iso_intervals.re"
+#line 218 "parse_iso_intervals.re"
{
timelib_time *current;
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 836 "<stdout>"
+#line 834 "<stdout>"
yy85:
YYDEBUG(85, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '9') goto yy98;
yy100:
YYDEBUG(100, *YYCURSOR);
-#line 209 "parse_iso_intervals.re"
+#line 207 "parse_iso_intervals.re"
{
DEBUG_OUTPUT("recurrences");
TIMELIB_INIT;
s->have_recurrences = 1;
return TIMELIB_PERIOD;
}
-#line 924 "<stdout>"
+#line 922 "<stdout>"
}
-#line 321 "parse_iso_intervals.re"
+#line 319 "parse_iso_intervals.re"
}
#ifdef PHP_WIN32
* THE SOFTWARE.
*/
-/* $Id$ */
-
#include "timelib.h"
#include "timelib_private.h"
#endif
#define TIMELIB_VERSION 201801
-#define TIMELIB_EXTENDED_VERSION 20180002
-#define TIMELIB_ASCII_VERSION "2018.01alpha2"
+#define TIMELIB_EXTENDED_VERSION 20180103
+#define TIMELIB_ASCII_VERSION "2018.01RC1"
#define TIMELIB_NONE 0x00
#define TIMELIB_OVERRIDE_TIME 0x01
* If the **errors points to a timelib_error_container variable, warnings
* and errors will be recorded. You are responsible for freeing the stored
* information with timelib_error_container_dtor(). To see whether errors have
- * occured, inspect errors->errors_count. To see whether warnings have occured,
+ * occurred, inspect errors->errors_count. To see whether warnings have occurred,
* inspect errors->warnings_count.
*
* The returned timelib_time* value is dynamically allocated and should be
* If the **errors points to a timelib_error_container variable, warnings
* and errors will be recorded. You are responsible for freeing the stored
* information with timelib_error_container_dtor(). To see whether errors have
- * occured, inspect errors->errors_count. To see whether warnings have occured,
+ * occurred, inspect errors->errors_count. To see whether warnings have occurred,
* inspect errors->warnings_count.
*
* The returned timelib_time* value is dynamically allocated and should be
* If the **errors points to a timelib_error_container variable, warnings
* and errors will be recorded. You are responsible for freeing the stored
* information with timelib_error_container_dtor(). To see whether errors have
- * occured, inspect errors->errors_count. To see whether warnings have occured,
+ * occurred, inspect errors->errors_count. To see whether warnings have occurred,
* inspect errors->warnings_count.
*/
void timelib_strtointerval(char *s, size_t len,
dnl
-dnl $Id$
-dnl
-dnl
dnl TL_DEF_HAVE(what [, why])
dnl
dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [WHY])'
{ "bmt", 0, 25632, "Asia/Jakarta" },
{ "bmt", 0, 6264, "Europe/Bucharest" },
{ "bmt", 0, 6264, "Europe/Chisinau" },
+ { "bost", 1, -12756, "America/La_Paz" },
{ "bst", 1, 3600, "Europe/London" },
{ "bst", 0, 3600, "Europe/London" },
- { "bst", 1, -12756, "America/La_Paz" },
{ "bst", 0, -39600, "America/Adak" },
{ "bst", 0, -39600, "America/Atka" },
{ "bst", 0, -39600, "America/Nome" },
{ "gmt", 0, 0, "Europe/Jersey" },
{ "gmt", 0, 0, "Europe/London" },
{ "gmt", 0, 0, "GB" },
- { "gmt", 1, 0, "Europe/Bratislava" },
- { "gmt", 1, 0, "Europe/Dublin" },
- { "gmt", 1, 0, "Europe/Prague" },
{ "gst", 0, 36000, "Pacific/Guam" },
{ "gst", 0, 36000, "Pacific/Saipan" },
{ "hdt", 1, -34200, "Pacific/Honolulu" },
{ "kdt", 1, 34200, "ROK" },
{ "kdt", 1, 36000, "ROK" },
{ "kmt", 0, 5736, "Europe/Vilnius" },
- { "kmt", 0, -18430, "America/Grand_Turk" },
- { "kmt", 0, -18430, "America/Jamaica" },
+ { "kmt", 0, -18431, "America/Grand_Turk" },
+ { "kmt", 0, -18431, "America/Jamaica" },
{ "kmt", 0, 7324, "Europe/Kiev" },
{ "kst", 0, 30600, "Asia/Seoul" },
{ "kst", 0, 32400, "Asia/Pyongyang" },
{ "mdt", 1, -21600, "Canada/Mountain" },
{ "mdt", 1, -21600, "Canada/Saskatchewan" },
{ "mdt", 1, -21600, "Mexico/BajaSur" },
+ { "mest", 1, 7200, "MET" },
+ { "met", 0, 3600, "MET" },
{ "mmt", 0, 9017, "Europe/Moscow" },
{ "mmt", 0, 9079, "Europe/Moscow" },
- { "mmt", 0, -13491, "America/Montevideo" },
+ { "mmt", 0, -13484, "America/Montevideo" },
{ "mmt", 0, -20712, "America/Managua" },
{ "mmt", 0, -2588, "Africa/Monrovia" },
{ "mmt", 0, -2670, "Africa/Monrovia" },
{ "wat", 0, 3600, "Africa/Ndjamena" },
{ "wat", 0, 3600, "Africa/Niamey" },
{ "wat", 0, 3600, "Africa/Porto-Novo" },
- { "wat", 0, 3600, "Africa/Sao_Tome" },
- { "wat", 1, 3600, "Africa/Windhoek" },
+ { "wat", 0, 3600, "Africa/Windhoek" },
{ "wemt", 1, 7200, "Europe/Lisbon" },
{ "wemt", 1, 7200, "Europe/Madrid" },
{ "wemt", 1, 7200, "Europe/Monaco" },
void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt)
{
+ do_range_limit_fraction(&rt->us, &rt->s);
do_range_limit(0, 60, 60, &rt->s, &rt->i);
do_range_limit(0, 60, 60, &rt->i, &rt->h);
do_range_limit(0, 24, 24, &rt->h, &rt->d);