Lines Matching defs:rule
136 find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year);
138 find_tzrule_ttinfo_fromutc(_tzrule *rule, int64_t ts, int year,
1067 // rule mimicking whatever ttinfo we've picked up, but it's possible
1220 // rule as:
1288 // This is actually more useful than you'd think — if you want a rule that
1335 tzrule_transitions(_tzrule *rule, int year, int64_t *start, int64_t *end)
1337 assert(rule->start != NULL);
1338 assert(rule->end != NULL);
1339 *start = rule->start->year_to_timestamp(rule->start, year);
1340 *end = rule->end->year_to_timestamp(rule->end, year);
1352 find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)
1354 if (rule->std_only) {
1355 return &(rule->std);
1361 tzrule_transitions(rule, year, &start, &end);
1371 if (fold == (rule->dst_diff >= 0)) {
1372 end -= rule->dst_diff;
1375 start += rule->dst_diff;
1386 return &(rule->dst);
1389 return &(rule->std);
1405 find_tzrule_ttinfo_fromutc(_tzrule *rule, int64_t ts, int year,
1408 if (rule->std_only) {
1410 return &(rule->std);
1415 tzrule_transitions(rule, year, &start, &end);
1416 start -= rule->std.utcoff_seconds;
1417 end -= rule->dst.utcoff_seconds;
1430 if (rule->dst_diff > 0) {
1432 ambig_end = end + rule->dst_diff;
1436 ambig_end = start - rule->dst_diff;
1442 return &(rule->dst);
1445 return &(rule->std);
1542 "Malformed transition rule in TZ string: %R",
1726 /* Parse the date portion of a transition rule. */
1730 // The full transition rule indicates when to change back and forth between
1736 // the number of characters that contributed to the transition rule. This
1737 // does not include the ',' at the end of the first rule.
1849 /* Parse the time portion of a transition rule (e.g. following an /) */