Lines Matching refs:y

31 static timelib_sll positive_mod(timelib_sll x, timelib_sll y)  in positive_mod()  argument
35 tmp = x % y; in positive_mod()
37 tmp += y; in positive_mod()
48 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
55 c1 = century_value(y / 100); in timelib_day_of_week_ex()
56 y1 = positive_mod(y, 100); in timelib_day_of_week_ex()
57 m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m]; in timelib_day_of_week_ex()
67 timelib_sll timelib_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_day_of_week() argument
69 return timelib_day_of_week_ex(y, m, d, 0); in timelib_day_of_week()
72 timelib_sll timelib_iso_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_iso_day_of_week() argument
74 return timelib_day_of_week_ex(y, m, d, 1); in timelib_iso_day_of_week()
83 timelib_sll timelib_day_of_year(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_day_of_year() argument
85 return (timelib_is_leap(y) ? d_table_leap[m] : d_table_common[m]) + d - 1; in timelib_day_of_year()
88 timelib_sll timelib_days_in_month(timelib_sll y, timelib_sll m) in timelib_days_in_month() argument
90 return timelib_is_leap(y) ? ml_table_leap[m] : ml_table_common[m]; in timelib_days_in_month()
93 void timelib_isoweek_from_date(timelib_sll y, timelib_sll m, timelib_sll d, timelib_sll *iw, timeli… in timelib_isoweek_from_date() argument
97 y_leap = timelib_is_leap(y); in timelib_isoweek_from_date()
98 prev_y_leap = timelib_is_leap(y-1); in timelib_isoweek_from_date()
99 doy = timelib_day_of_year(y, m, d) + 1; in timelib_isoweek_from_date()
103 jan1weekday = timelib_day_of_week(y, 1, 1); in timelib_isoweek_from_date()
104 weekday = timelib_day_of_week(y, m, d); in timelib_isoweek_from_date()
109 *iy = y - 1; in timelib_isoweek_from_date()
116 *iy = y; in timelib_isoweek_from_date()
119 if (*iy == y) { in timelib_isoweek_from_date()
124 *iy = y + 1; in timelib_isoweek_from_date()
130 if (*iy == y) { in timelib_isoweek_from_date()
141 void timelib_isodate_from_date(timelib_sll y, timelib_sll m, timelib_sll d, timelib_sll *iy, timeli… in timelib_isodate_from_date() argument
143 timelib_isoweek_from_date(y, m, d, iw, iy); in timelib_isodate_from_date()
144 *id = timelib_day_of_week_ex(y, m, d, 1); in timelib_isodate_from_date()
147 …ib_sll timelib_daynr_from_weeknr_ex(timelib_sll iy, timelib_sll iw, timelib_sll id, timelib_sll *y) in timelib_daynr_from_weeknr_ex() argument
156 *y = (iw == 1 && day < 0 && id < dow) ? iy - 1 : iy; in timelib_daynr_from_weeknr_ex()
169 void timelib_date_from_isodate(timelib_sll iy, timelib_sll iw, timelib_sll id, timelib_sll *y, time… in timelib_date_from_isodate() argument
171 timelib_sll daynr = timelib_daynr_from_weeknr_ex(iy, iw, id, y) + 1; in timelib_date_from_isodate()
177 *y += 1; in timelib_date_from_isodate()
180 if (timelib_is_leap(*y)) { in timelib_date_from_isodate()
183 *y += 1; in timelib_date_from_isodate()
189 *y += 1; in timelib_date_from_isodate()
201 *y -= 1; in timelib_date_from_isodate()
216 int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d) in timelib_valid_date() argument
218 if (m < 1 || m > 12 || d < 1 || d > timelib_days_in_month(y, m)) { in timelib_valid_date()