Lines Matching refs:interval

100 timelib_time *timelib_add(timelib_time *old_time, timelib_rel_time *interval)  in timelib_add()  argument
105 if (interval->have_weekday_relative || interval->have_special_relative) { in timelib_add()
106 memcpy(&t->relative, interval, sizeof(timelib_rel_time)); in timelib_add()
108 if (interval->invert) { in timelib_add()
112 t->relative.y = interval->y * bias; in timelib_add()
113 t->relative.m = interval->m * bias; in timelib_add()
114 t->relative.d = interval->d * bias; in timelib_add()
115 t->relative.h = interval->h * bias; in timelib_add()
116 t->relative.i = interval->i * bias; in timelib_add()
117 t->relative.s = interval->s * bias; in timelib_add()
118 t->relative.us = interval->us * bias; in timelib_add()
127 if (old_time->dst == 1 && t->dst == 0 && !interval->y && !interval->m && !interval->d) { in timelib_add()
138 timelib_time *timelib_sub(timelib_time *old_time, timelib_rel_time *interval) in timelib_sub() argument
143 if (interval->invert) { in timelib_sub()
148 t->relative.y = 0 - (interval->y * bias); in timelib_sub()
149 t->relative.m = 0 - (interval->m * bias); in timelib_sub()
150 t->relative.d = 0 - (interval->d * bias); in timelib_sub()
151 t->relative.h = 0 - (interval->h * bias); in timelib_sub()
152 t->relative.i = 0 - (interval->i * bias); in timelib_sub()
153 t->relative.s = 0 - (interval->s * bias); in timelib_sub()
154 t->relative.us = 0 - (interval->us * bias); in timelib_sub()
161 if (old_time->dst == 1 && t->dst == 0 && !interval->y && !interval->m && !interval->d) { in timelib_sub()
166 if (old_time->dst == 0 && t->dst == 1 && !interval->y && !interval->m && !interval->d ) { in timelib_sub()