Lines Matching refs:y

26 static timelib_sll positive_mod(timelib_sll x, timelib_sll y)  in positive_mod()  argument
30 tmp = x % y; in positive_mod()
32 tmp += y; in positive_mod()
43 static timelib_sll timelib_day_of_week_ex(timelib_sll y, timelib_sll m, timelib_sll d, int iso) in timelib_day_of_week_ex() argument
50 c1 = century_value(y / 100); in timelib_day_of_week_ex()
51 y1 = positive_mod(y, 100); in timelib_day_of_week_ex()
52 m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m]; in timelib_day_of_week_ex()
62 timelib_sll timelib_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_day_of_week() argument
64 return timelib_day_of_week_ex(y, m, d, 0); in timelib_day_of_week()
67 timelib_sll timelib_iso_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_iso_day_of_week() argument
69 return timelib_day_of_week_ex(y, m, d, 1); in timelib_iso_day_of_week()
78 timelib_sll timelib_day_of_year(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_day_of_year() argument
80 return (timelib_is_leap(y) ? d_table_leap[m] : d_table_common[m]) + d - 1; in timelib_day_of_year()
83 timelib_sll timelib_days_in_month(timelib_sll y, timelib_sll m) in timelib_days_in_month() argument
85 return timelib_is_leap(y) ? ml_table_leap[m] : ml_table_common[m]; in timelib_days_in_month()
88 void timelib_isoweek_from_date(timelib_sll y, timelib_sll m, timelib_sll d, timelib_sll *iw, timeli… in timelib_isoweek_from_date() argument
92 y_leap = timelib_is_leap(y); in timelib_isoweek_from_date()
93 prev_y_leap = timelib_is_leap(y-1); in timelib_isoweek_from_date()
94 doy = timelib_day_of_year(y, m, d) + 1; in timelib_isoweek_from_date()
98 jan1weekday = timelib_day_of_week(y, 1, 1); in timelib_isoweek_from_date()
99 weekday = timelib_day_of_week(y, m, d); in timelib_isoweek_from_date()
104 *iy = y - 1; in timelib_isoweek_from_date()
111 *iy = y; in timelib_isoweek_from_date()
114 if (*iy == y) { in timelib_isoweek_from_date()
119 *iy = y + 1; in timelib_isoweek_from_date()
125 if (*iy == y) { in timelib_isoweek_from_date()
136 timelib_sll timelib_daynr_from_weeknr(timelib_sll y, timelib_sll w, timelib_sll d) in timelib_daynr_from_weeknr() argument
141 dow = timelib_day_of_week(y, 1, 1); in timelib_daynr_from_weeknr()
157 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_valid_date() argument
159 if (m < 1 || m > 12 || d < 1 || d > timelib_days_in_month(y, m)) { in timelib_valid_date()