Lines Matching refs:d

65 …l *base_y, timelib_sll *base_m, timelib_sll *y, timelib_sll *m, timelib_sll *d, timelib_sll invert)  in do_range_limit_days_relative()  argument
80 while (*d < 0) { in do_range_limit_days_relative()
87 *d += days; in do_range_limit_days_relative()
91 while (*d < 0) { in do_range_limit_days_relative()
97 *d += days; in do_range_limit_days_relative()
107 static int do_range_limit_days(timelib_sll *y, timelib_sll *m, timelib_sll *d) in do_range_limit_days() argument
115 if (*d >= DAYS_PER_LYEAR_PERIOD || *d <= -DAYS_PER_LYEAR_PERIOD) { in do_range_limit_days()
116 *y += YEARS_PER_LYEAR_PERIOD * (*d / DAYS_PER_LYEAR_PERIOD); in do_range_limit_days()
117 *d -= DAYS_PER_LYEAR_PERIOD * (*d / DAYS_PER_LYEAR_PERIOD); in do_range_limit_days()
135 if (*d <= 0) { in do_range_limit_days()
136 *d += days_last_month; in do_range_limit_days()
140 if (*d > days_this_month) { in do_range_limit_days()
141 *d -= days_this_month; in do_range_limit_days()
152 current_dow = timelib_day_of_week(time->y, time->m, time->d); in do_adjust_for_weekday()
166 time->d -= current_dow; in do_adjust_for_weekday()
167 time->d += time->relative.weekday; in do_adjust_for_weekday()
171 …if ((time->relative.d < 0 && difference < 0) || (time->relative.d >= 0 && difference <= -time->rel… in do_adjust_for_weekday()
175 time->d += difference; in do_adjust_for_weekday()
177 time->d -= (7 - (abs(time->relative.weekday) - current_dow)); in do_adjust_for_weekday()
186 do_range_limit(0, 24, 24, &rt->h, &rt->d); in timelib_do_rel_normalize()
189 do_range_limit_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d, rt->invert); in timelib_do_rel_normalize()
197 if (time->s != TIMELIB_UNSET) do_range_limit(0, 24, 24, &time->h, &time->d); in timelib_do_normalize()
200 do {} while (do_range_limit_days(&time->y, &time->m, &time->d)); in timelib_do_normalize()
216 time->d += time->relative.d; in do_adjust_relative()
223 time->d = 1; in do_adjust_relative()
226 time->d = 0; in do_adjust_relative()
239 dow = timelib_day_of_week(time->y, time->m, time->d); in do_adjust_special_weekday()
242 time->d += (count / 5) * 7; in do_adjust_special_weekday()
251 time->d -= 2; in do_adjust_special_weekday()
253 time->d -= 1; in do_adjust_special_weekday()
258 time->d += 1; in do_adjust_special_weekday()
262 time->d += 2; in do_adjust_special_weekday()
270 time->d += 2; in do_adjust_special_weekday()
272 time->d += 1; in do_adjust_special_weekday()
275 time->d -= 1; in do_adjust_special_weekday()
277 time->d -= 2; in do_adjust_special_weekday()
281 time->d += rem; in do_adjust_special_weekday()
302 time->d = 1; in do_adjust_special_early()
307 time->d = 1; in do_adjust_special_early()
315 time->d = 1; in do_adjust_special_early()
318 time->d = 0; in do_adjust_special_early()
458 res += do_days(time->d); in timelib_update_ts()
477 time.y, time.m, time.d, time.h, time.i, time.s, time.f, time.z, time.dst);
480 …time.relative.y, time.relative.m, time.relative.d, time.relative.h, time.relative.i, time.relative…