Lines Matching defs:year
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,
166 is_leap_year(int year);
1167 /* Function to calculate the local timestamp of a transition from the year. */
1169 calendarrule_year_to_timestamp(TransitionRuleType *base_self, int year)
1173 // We want (year, month, day of month); we have year and month, but we
1179 int8_t first_day = (ymd_to_ord(year, self->month, 1) + 6) % 7;
1181 if (self->month == 2 && is_leap_year(year)) {
1209 int64_t ordinal = ymd_to_ord(year, self->month, month_day) - EPOCHORDINAL;
1222 // The d'th day (0 <= d <= 6) of week n of month m of the year (1 <= n <=
1259 /* Function to calculate the local timestamp of a transition from the year.
1261 * This translates the day of the year into a local timestamp — either a
1262 * 1-based Julian day, not including leap days, or the 0-based year-day,
1266 dayrule_year_to_timestamp(TransitionRuleType *base_self, int year)
1279 int64_t days_before_year = ymd_to_ord(year, 1, 1) - EPOCHORDINAL - 1;
1293 if (self->julian && day >= 59 && is_leap_year(year)) {
1333 /* Calculate the start and end rules for a _tzrule in the given year. */
1335 tzrule_transitions(_tzrule *rule, int year, int64_t *start, int64_t *end)
1339 *start = rule->start->year_to_timestamp(rule->start, year);
1340 *end = rule->end->year_to_timestamp(rule->end, year);
1345 * This takes a local timestamp and fold for disambiguation purposes; the year
1347 * callers of this function already have the year information accessible from
1352 find_tzrule_ttinfo(_tzrule *rule, int64_t ts, unsigned char fold, int year)
1361 tzrule_transitions(rule, year, &start, &end);
1399 * The year is technically a redundant parameter, because it can be calculated
1400 * from the timestamp, but all callers of this function should have the year
1405 find_tzrule_ttinfo_fromutc(_tzrule *rule, int64_t ts, int year,
1415 tzrule_transitions(rule, year, &start, &end);
1748 // 2. n: Day of year (0-based, with leap days)
2172 is_leap_year(int year)
2174 const unsigned int ayear = (unsigned int)year;
2178 /* Calculates ordinal datetime from year, month and day. */