Lines Matching refs:s

38 # define strtoll(s, f, b) _atoi64(s)
41 # define strtoll(s, f, b) atoll(s)
43 # define strtoll(s, f, b) strtol(s, f, b)
101 #define YYLIMIT s->lim
102 #define YYMARKER s->ptr
105 #define RET(i) {s->cur = cursor; return i;}
109s->time->have_time) { add_error(s, "Double time specification"); timelib_string_free(str); return …
110 #define TIMELIB_UNHAVE_TIME() { s->time->have_time = 0; s->time->h = 0; s->time->i = 0; s->time->s
111 …E_DATE() { if (s->time->have_date) { add_error(s, "Double date specification"); timelib_string_fre…
112 #define TIMELIB_UNHAVE_DATE() { s->time->have_date = 0; s->time->d = 0; s->time->m = 0; s->time->y …
113 #define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; }
114 #define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_weekda…
115 #define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_specia…
116s->cur = cursor; if (s->time->have_zone) { s->time->have_zone > 1 ? add_error(s, "Double timezone …
118 #define TIMELIB_INIT s->cur = cursor; str = timelib_string(s); ptr = str
135 #define DEBUG_OUTPUT(s) printf("%s\n", s);
136 #define YYDEBUG(s,c) { if (s != -1) { printf("state: %d ", s); printf("[%c]\n", c); } }
138 #define DEBUG_OUTPUT(s)
139 #define YYDEBUG(s,c)
296 static char* timelib_ltrim(char *s)
298 char *ptr = s;
307 uchar *fill(Scanner *s, uchar *cursor){
308 if(!s->eof){
309 unsigned int cnt = s->tok - s->bot;
311 memcpy(s->bot, s->tok, s->lim - s->tok);
312 s->tok = s->bot;
313 s->ptr -= cnt;
315 s->pos -= cnt;
316 s->lim -= cnt;
318 if((s->top - s->lim) < BSIZE){
319 uchar *buf = (uchar*) malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar));
320 memcpy(buf, s->tok, s->lim - s->tok);
321 s->tok = buf;
322 s->ptr = &buf[s->ptr - s->bot];
323 cursor = &buf[cursor - s->bot];
324 s->pos = &buf[s->pos - s->bot];
325 s->lim = &buf[s->lim - s->bot];
326 s->top = &s->lim[BSIZE];
327 free(s->bot);
328 s->bot = buf;
330 if((cnt = read(s->fd, (char*) s->lim, BSIZE)) != BSIZE){
331 s->eof = &s->lim[cnt]; *(s->eof)++ = '\n';
333 s->lim += cnt;
339 static void add_warning(Scanner *s, char *error)
341 s->errors->warning_count++;
342s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * size…
343 s->errors->warning_messages[s->errors->warning_count - 1].position = s->tok ? s->tok - s->str : 0;
344 s->errors->warning_messages[s->errors->warning_count - 1].character = s->tok ? *s->tok : 0;
345 s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
348 static void add_error(Scanner *s, char *error)
350 s->errors->error_count++;
351s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(tim…
352 s->errors->error_messages[s->errors->error_count - 1].position = s->tok ? s->tok - s->str : 0;
353 s->errors->error_messages[s->errors->error_count - 1].character = s->tok ? *s->tok : 0;
354 s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
357 static void add_pbf_warning(Scanner *s, char *error, char *sptr, char *cptr)
359 s->errors->warning_count++;
360s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * size…
361 s->errors->warning_messages[s->errors->warning_count - 1].position = cptr - sptr;
362 s->errors->warning_messages[s->errors->warning_count - 1].character = *cptr;
363 s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error);
366 static void add_pbf_error(Scanner *s, char *error, char *sptr, char *cptr)
368 s->errors->error_count++;
369s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(tim…
370 s->errors->error_messages[s->errors->error_count - 1].position = cptr - sptr;
371 s->errors->error_messages[s->errors->error_count - 1].character = *cptr;
372 s->errors->error_messages[s->errors->error_count - 1].message = strdup(error);
434 static char *timelib_string(Scanner *s)
436 char *tmp = calloc(1, s->cur - s->tok + 1);
437 memcpy(tmp, s->tok, s->cur - s->tok);
639 static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, Scanner *s)
648 case TIMELIB_SECOND: s->time->relative.s += amount * relunit->multiplier; break;
649 case TIMELIB_MINUTE: s->time->relative.i += amount * relunit->multiplier; break;
650 case TIMELIB_HOUR: s->time->relative.h += amount * relunit->multiplier; break;
651 case TIMELIB_DAY: s->time->relative.d += amount * relunit->multiplier; break;
652 case TIMELIB_MONTH: s->time->relative.m += amount * relunit->multiplier; break;
653 case TIMELIB_YEAR: s->time->relative.y += amount * relunit->multiplier; break;
658 s->time->relative.d += (amount > 0 ? amount - 1 : amount) * 7;
659 s->time->relative.weekday = relunit->multiplier;
660 s->time->relative.weekday_behavior = behavior;
666 s->time->relative.special.type = relunit->multiplier;
667 s->time->relative.special.amount = amount;
699 /* Still didn't find anything, let's find the zone solely based on
807 static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
809 uchar *cursor = s->cur;
813 s->tok = cursor;
814 s->len = 0;
931 …cond'|'min'|'minute'|'hour'|'day'|'fortnight'|'forthnight'|'month'|'year') 's'?) | 'weeks' | dayte…
951 s->time->relative.d = -1;
971 s->time->h = 12;
994 s->time->relative.d = 1;
1010 s->time->y = 1970;
1011 s->time->m = 1;
1012 s->time->d = 1;
1013 s->time->h = s->time->i = s->time->s = 0;
1014 s->time->f = 0.0;
1015 s->time->relative.s += i;
1016 s->time->is_localtime = 1;
1017 s->time->zone_type = TIMELIB_ZONETYPE_OFFSET;
1018 s->time->z = 0;
1019 s->time->dst = 0;
1033 s->time->relative.first_last_day_of = TIMELIB_SPECIAL_LAST_DAY_OF_MONTH;
1035 s->time->relative.first_last_day_of = TIMELIB_SPECIAL_FIRST_DAY_OF_MONTH;
1050 s->time->h = timelib_get_nr((char **) &ptr, 2);
1051 s->time->i = 15;
1053 s->time->h = timelib_get_nr((char **) &ptr, 2) - 1;
1054 s->time->i = 45;
1058 s->time->h += timelib_meridian((char **) &ptr, s->time->h);
1077 s->time->relative.special.type = TIMELIB_SPECIAL_DAY_OF_WEEK_IN_MONTH;
1078 timelib_set_relative((char **) &ptr, i, 1, s);
1080 s->time->relative.special.type = TIMELIB_SPECIAL_LAST_DAY_OF_WEEK_IN_MONTH;
1081 timelib_set_relative((char **) &ptr, i, behavior, s);
1092 s->time->h = timelib_get_nr((char **) &ptr, 2);
1094 s->time->i = timelib_get_nr((char **) &ptr, 2);
1096 s->time->s = timelib_get_nr((char **) &ptr, 2);
1099 s->time->h += timelib_meridian((char **) &ptr, s->time->h);
1109 s->time->h = timelib_get_nr((char **) &ptr, 2);
1110 s->time->i = timelib_get_nr((char **) &ptr, 2);
1112 s->time->s = timelib_get_nr((char **) &ptr, 2);
1115 s->time->f = timelib_get_frac_nr((char **) &ptr, 8);
1119 s->time->h += timelib_meridian((char **) &ptr, s->time->h);
1130 s->time->h = timelib_get_nr((char **) &ptr, 2);
1131 s->time->i = timelib_get_nr((char **) &ptr, 2);
1133 s->time->s = timelib_get_nr((char **) &ptr, 2);
1136 s->time->f = timelib_get_frac_nr((char **) &ptr, 8);
1141s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
1143 add_error(s, "The timezone could not be found in the database");
1154 switch (s->time->have_time) {
1156 s->time->h = timelib_get_nr((char **) &ptr, 2);
1157 s->time->i = timelib_get_nr((char **) &ptr, 2);
1158 s->time->s = 0;
1161 s->time->y = timelib_get_nr((char **) &ptr, 4);
1165 add_error(s, "Double time specification");
1168 s->time->have_time++;
1177 switch (s->time->have_time) {
1179 s->time->h = timelib_get_nr((char **) &ptr, 2);
1180 s->time->i = timelib_get_nr((char **) &ptr, 2);
1181 s->time->s = 0;
1182s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, s->tzdb, tz_get_wrapper);
1185 s->time->y = timelib_get_nr((char **) &ptr, 4);
1191 s->time->have_time++;
1202 s->time->h = timelib_get_nr((char **) &ptr, 2);
1203 s->time->i = timelib_get_nr((char **) &ptr, 2);
1204 s->time->s = timelib_get_nr((char **) &ptr, 2);
1207s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
1209 add_error(s, "The timezone could not be found in the database");
1222 s->time->m = timelib_get_nr((char **) &ptr, 2);
1223 s->time->d = timelib_get_nr((char **) &ptr, 2);
1225 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1226 TIMELIB_PROCESS_YEAR(s->time->y, length);
1237 s->time->y = timelib_get_unsigned_nr((char **) &ptr, 4);
1238 s->time->m = timelib_get_nr((char **) &ptr, 2);
1239 s->time->d = timelib_get_nr((char **) &ptr, 2);
1250 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1251 s->time->m = timelib_get_nr((char **) &ptr, 2);
1252 s->time->d = timelib_get_nr((char **) &ptr, 2);
1253 TIMELIB_PROCESS_YEAR(s->time->y, length);
1264 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1265 s->time->m = timelib_get_nr((char **) &ptr, 2);
1266 s->time->d = 1;
1267 TIMELIB_PROCESS_YEAR(s->time->y, length);
1278 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1279 s->time->m = timelib_get_nr((char **) &ptr, 2);
1280 s->time->d = timelib_get_nr((char **) &ptr, 2);
1281 TIMELIB_PROCESS_YEAR(s->time->y, length);
1292 s->time->d = timelib_get_nr((char **) &ptr, 2);
1294 s->time->m = timelib_get_month((char **) &ptr);
1295 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1296 TIMELIB_PROCESS_YEAR(s->time->y, length);
1306 s->time->d = timelib_get_nr((char **) &ptr, 2);
1307 s->time->m = timelib_get_nr((char **) &ptr, 2);
1308 s->time->y = timelib_get_nr((char **) &ptr, 4);
1319 s->time->d = timelib_get_nr((char **) &ptr, 2);
1320 s->time->m = timelib_get_nr((char **) &ptr, 2);
1321 s->time->y = timelib_get_nr_ex((char **) &ptr, 2, &length);
1322 TIMELIB_PROCESS_YEAR(s->time->y, length);
1333 s->time->m = timelib_get_month((char **) &ptr);
1334 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1335 s->time->d = 1;
1336 TIMELIB_PROCESS_YEAR(s->time->y, length);
1347 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1348 s->time->m = timelib_get_month((char **) &ptr);
1349 s->time->d = 1;
1350 TIMELIB_PROCESS_YEAR(s->time->y, length);
1361 s->time->m = timelib_get_month((char **) &ptr);
1362 s->time->d = timelib_get_nr((char **) &ptr, 2);
1363 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1364 TIMELIB_PROCESS_YEAR(s->time->y, length);
1374 s->time->d = timelib_get_nr((char **) &ptr, 2);
1376 s->time->m = timelib_get_month((char **) &ptr);
1386 s->time->y = timelib_get_nr((char **) &ptr, 4);
1387 s->time->m = timelib_get_nr((char **) &ptr, 2);
1388 s->time->d = timelib_get_nr((char **) &ptr, 2);
1400 s->time->y = timelib_get_nr((char **) &ptr, 4);
1401 s->time->m = timelib_get_nr((char **) &ptr, 2);
1402 s->time->d = timelib_get_nr((char **) &ptr, 2);
1403 s->time->h = timelib_get_nr((char **) &ptr, 2);
1404 s->time->i = timelib_get_nr((char **) &ptr, 2);
1405 s->time->s = timelib_get_nr((char **) &ptr, 2);
1407 s->time->f = timelib_get_frac_nr((char **) &ptr, 9);
1409s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
1411 add_error(s, "The timezone could not be found in the database");
1425 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1426 s->time->d = timelib_get_nr((char **) &ptr, 3);
1427 s->time->m = 1;
1428 TIMELIB_PROCESS_YEAR(s->time->y, length);
1441 s->time->y = timelib_get_nr((char **) &ptr, 4);
1444 s->time->m = 1;
1445 s->time->d = 1;
1446 s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d);
1460 s->time->y = timelib_get_nr((char **) &ptr, 4);
1463 s->time->m = 1;
1464 s->time->d = 1;
1465 s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d);
1477 s->time->m = timelib_get_month((char **) &ptr);
1478 s->time->d = timelib_get_nr((char **) &ptr, 2);
1479 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1480 TIMELIB_PROCESS_YEAR(s->time->y, length);
1491 s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length);
1492 s->time->m = timelib_get_month((char **) &ptr);
1493 s->time->d = timelib_get_nr((char **) &ptr, 2);
1494 TIMELIB_PROCESS_YEAR(s->time->y, length);
1506 s->time->d = timelib_get_nr((char **) &ptr, 2);
1507 s->time->m = timelib_get_month((char **) &ptr);
1508 s->time->y = timelib_get_nr((char **) &ptr, 4);
1509 s->time->h = timelib_get_nr((char **) &ptr, 2);
1510 s->time->i = timelib_get_nr((char **) &ptr, 2);
1511 s->time->s = timelib_get_nr((char **) &ptr, 2);
1512s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
1514 add_error(s, "The timezone could not be found in the database");
1524 s->time->y = timelib_get_nr((char **) &ptr, 4);
1533 s->time->relative.y = 0 - s->time->relative.y;
1534 s->time->relative.m = 0 - s->time->relative.m;
1535 s->time->relative.d = 0 - s->time->relative.d;
1536 s->time->relative.h = 0 - s->time->relative.h;
1537 s->time->relative.i = 0 - s->time->relative.i;
1538 s->time->relative.s = 0 - s->time->relative.s;
1539 s->time->relative.weekday = 0 - s->time->relative.weekday;
1540 if (s->time->relative.weekday == 0) {
1541 s->time->relative.weekday = -7;
1543 …if (s->time->relative.have_special_relative && s->time->relative.special.type == TIMELIB_SPECIAL_W…
1544 s->time->relative.special.amount = 0 - s->time->relative.special.amount;
1559 s->time->relative.weekday = relunit->multiplier;
1560 if (s->time->relative.weekday_behavior != 2) {
1561 s->time->relative.weekday_behavior = 1;
1579 timelib_set_relative((char **) &ptr, i, behavior, s);
1580 s->time->relative.weekday_behavior = 2;
1583 if (s->time->relative.have_weekday_relative == 0) {
1585 s->time->relative.weekday = 1;
1603 timelib_set_relative((char **) &ptr, i, behavior, s);
1614 s->time->m = timelib_lookup_month((char **) &ptr);
1625s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
1627 add_error(s, "The timezone could not be found in the database");
1638 s->time->m = timelib_get_month((char **) &ptr);
1639 s->time->d = timelib_get_nr((char **) &ptr, 2);
1642 s->time->h = timelib_get_nr((char **) &ptr, 2);
1643 s->time->i = timelib_get_nr((char **) &ptr, 2);
1645 s->time->s = timelib_get_nr((char **) &ptr, 2);
1648 s->time->f = timelib_get_frac_nr((char **) &ptr, 8);
1652 s->time->h += timelib_meridian((char **) &ptr, s->time->h);
1663 s->time->m = timelib_get_month((char **) &ptr);
1664 s->time->d = timelib_get_nr((char **) &ptr, 2);
1667 s->time->h = timelib_get_nr((char **) &ptr, 2);
1668 s->time->i = timelib_get_nr((char **) &ptr, 2);
1670 s->time->s = timelib_get_nr((char **) &ptr, 2);
1673 s->time->f = timelib_get_frac_nr((char **) &ptr, 8);
1678s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
1680 add_error(s, "The timezone could not be found in the database");
1697 timelib_set_relative((char **) &ptr, i, 1, s);
1710 s->pos = cursor; s->line++;
1716 add_error(s, "Unexpected character");
1724 timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const ti…
1728 char *e = s + len - 1;
1738 while (isspace(*s) && s < e) {
1739 s++;
1741 while (isspace(*e) && e > s) {
1745 if (e - s < 0) {
1753 …in.time->y = in.time->d = in.time->m = in.time->h = in.time->i = in.time->s = in.time->f = in.time…
1759 in.str = malloc((e - s) + YYMAXFILL);
1760 memset(in.str, 0, (e - s) + YYMAXFILL);
1761 memcpy(in.str, s, (e - s));
1762 in.lim = in.str + (e - s) + YYMAXFILL;
1770 in.time->s = TIMELIB_UNSET;
1787 if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) {
1807 add_pbf_error(s, "Unexpected data found.", string, begin); \
1817 time->h = time->i = time->s = 0;
1831 if (time->s == TIMELIB_UNSET ) time->s = 0;
1842 Scanner *s = &in;
1858 in.time->s = TIMELIB_UNSET;
1877 add_pbf_error(s, "A textual day could not be found", string, begin);
1890 if ((s->time->d = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) {
1891 add_pbf_error(s, "A two digit day could not be found", string, begin);
1900 add_pbf_error(s, "A three digit day-of-year could not be found", string, begin);
1902 s->time->m = 1;
1903 s->time->d = tmp + 1;
1904 timelib_do_normalize(s->time);
1911 if ((s->time->m = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) {
1912 add_pbf_error(s, "A two digit month could not be found", string, begin);
1919 add_pbf_error(s, "A textual month could not be found", string, begin);
1921 s->time->m = tmp;
1928 if ((s->time->y = timelib_get_nr_ex((char **) &ptr, 2, &length)) == TIMELIB_UNSET) {
1929 add_pbf_error(s, "A two digit year could not be found", string, begin);
1931 TIMELIB_PROCESS_YEAR(s->time->y, length);
1936 if ((s->time->y = timelib_get_nr((char **) &ptr, 4)) == TIMELIB_UNSET) {
1937 add_pbf_error(s, "A four digit year could not be found", string, begin);
1943 if ((s->time->h = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) {
1944 add_pbf_error(s, "A two digit hour could not be found", string, begin);
1946 if (s->time->h > 12) {
1947 add_pbf_error(s, "Hour can not be higher than 12", string, begin);
1953 if ((s->time->h = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) {
1954 add_pbf_error(s, "A two digit hour could not be found", string, begin);
1959 if (s->time->h == TIMELIB_UNSET) {
1960 add_pbf_error(s, "Meridian can only come after an hour has been found", string, begin);
1961 } else if ((tmp = timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
1962 add_pbf_error(s, "A meridian could not be found", string, begin);
1964 s->time->h += tmp;
1975 add_pbf_error(s, "A two digit minute could not be found", string, begin);
1977 s->time->i = min;
1981 case 's': /* two digit second, with leading zero */
1989 add_pbf_error(s, "A two digit second could not be found", string, begin);
1991 s->time->s = sec;
2003 add_pbf_error(s, "A six digit millisecond could not be found", string, begin);
2005 s->time->f = (f / pow(10, (ptr - tptr)));
2016 s->time->y = 1970;
2017 s->time->m = 1;
2018 s->time->d = 1;
2019 s->time->h = s->time->i = s->time->s = 0;
2020 s->time->f = 0.0;
2021 s->time->relative.s += tmp;
2022 s->time->is_localtime = 1;
2023 s->time->zone_type = TIMELIB_ZONETYPE_OFFSET;
2024 s->time->z = 0;
2025 s->time->dst = 0;
2034s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz…
2036 add_pbf_error(s, "The timezone could not be found in the database", string, begin);
2045 add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
2060 add_pbf_error(s, "The separation symbol could not be found", string, begin);
2065 timelib_time_reset_fields(s->time);
2069 timelib_time_reset_unset_fields(s->time);
2078 add_pbf_error(s, "Escaped character expected", string, begin);
2085 add_pbf_error(s, "The escaped character could not be found", string, begin);
2099 add_pbf_error(s, "The format separator does not match", string, begin);
2107 add_pbf_warning(s, "Trailing data", string, ptr);
2109 add_pbf_error(s, "Trailing data", string, ptr);
2112 /* ignore trailing +'s */
2122 timelib_time_reset_fields(s->time);
2126 timelib_time_reset_unset_fields(s->time);
2130 add_pbf_error(s, "Data missing", string, ptr);
2137 if (s->time->h != TIMELIB_UNSET || s->time->i != TIMELIB_UNSET || s->time->s != TIMELIB_UNSET) {
2138 if (s->time->h == TIMELIB_UNSET ) {
2139 s->time->h = 0;
2141 if (s->time->i == TIMELIB_UNSET ) {
2142 s->time->i = 0;
2144 if (s->time->s == TIMELIB_UNSET ) {
2145 s->time->s = 0;
2150 if (s->time->h != TIMELIB_UNSET && s->time->i != TIMELIB_UNSET &&
2151 s->time->s != TIMELIB_UNSET &&
2152 !timelib_valid_time( s->time->h, s->time->i, s->time->s)) {
2153 add_pbf_warning(s, "The parsed time was invalid", string, ptr);
2156 if (s->time->y != TIMELIB_UNSET && s->time->m != TIMELIB_UNSET &&
2157 s->time->d != TIMELIB_UNSET &&
2158 !timelib_valid_date( s->time->y, s->time->m, s->time->d)) {
2159 add_pbf_warning(s, "The parsed date was invalid", string, ptr);
2175 parsed->s = 0;
2183 if (parsed->s == TIMELIB_UNSET) parsed->s = now->s != TIMELIB_UNSET ? now->s : 0;
2228 time.y, time.m, time.d, time.h, time.i, time.s, time.f, time.z, time.dst);
2231 …e.relative.y, time.relative.m, time.relative.d, time.relative.h, time.relative.i, time.relative.s);