Lines Matching refs:y
52 static void inc_month(timelib_sll *y, timelib_sll *m) in inc_month() argument
57 (*y)++; in inc_month()
61 static void dec_month(timelib_sll *y, timelib_sll *m) in dec_month() argument
66 (*y)--; in dec_month()
70 static void do_range_limit_days_relative(timelib_sll *base_y, timelib_sll *base_m, timelib_sll *y, … in do_range_limit_days_relative() argument
112 static int do_range_limit_days(timelib_sll *y, timelib_sll *m, timelib_sll *d) in do_range_limit_days() argument
122 *y += YEARS_PER_ERA * (*d / DAYS_PER_ERA); in do_range_limit_days()
126 do_range_limit(1, 13, 12, m, y); in do_range_limit_days()
128 leapyear = timelib_is_leap(*y); in do_range_limit_days()
135 previous_year = (*y) - 1; in do_range_limit_days()
137 previous_year = (*y); in do_range_limit_days()
158 current_dow = timelib_day_of_week(time->y, time->m, time->d); in do_adjust_for_weekday()
194 do_range_limit(0, 12, 12, &rt->m, &rt->y); in timelib_do_rel_normalize()
196 do_range_limit_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d, rt->invert); in timelib_do_rel_normalize()
197 do_range_limit(0, 12, 12, &rt->m, &rt->y); in timelib_do_rel_normalize()
202 timelib_sll y, ddd, mi, mm, dd, g; in magic_date_calc() local
211 y = (10000 * g + 14780) / 3652425; in magic_date_calc()
212 ddd = g - ((365*y) + (y/4) - (y/100) + (y/400)); in magic_date_calc()
214 y--; in magic_date_calc()
215 ddd = g - ((365*y) + (y/4) - (y/100) + (y/400)); in magic_date_calc()
219 y = y + (mi + 2) / 12; in magic_date_calc()
221 time->y = y; in magic_date_calc()
232 do_range_limit(1, 13, 12, &time->m, &time->y); in timelib_do_normalize()
235 if (time->y == 1970 && time->m == 1 && time->d != 1) { in timelib_do_normalize()
239 do {} while (do_range_limit_days(&time->y, &time->m, &time->d)); in timelib_do_normalize()
240 do_range_limit(1, 13, 12, &time->m, &time->y); in timelib_do_normalize()
259 time->y += time->relative.y; in do_adjust_relative()
280 dow = timelib_day_of_week(time->y, time->m, time->d); in do_adjust_special_weekday()
455 timelib_sll y = time->y; // Make copy, as we don't want to change the original one in timelib_epoch_days_from_time() local
458 y -= time->m <= 2; in timelib_epoch_days_from_time()
459 era = (y >= 0 ? y : y - 399) / YEARS_PER_ERA; in timelib_epoch_days_from_time()
460 …year_of_era = y - era * YEARS_PER_ERA; // [… in timelib_epoch_days_from_time()
498 time.y, time.m, time.d, time.h, time.i, time.s, time.f, time.z, time.dst);
501 …time.relative.y, time.relative.m, time.relative.d, time.relative.h, time.relative.i, time.relative…