Lines Matching refs:month

50 mp_uint_t timeutils_days_in_month(mp_uint_t year, mp_uint_t month) {  in timeutils_days_in_month()  argument
51 mp_uint_t mdays = days_since_jan1[month] - days_since_jan1[month - 1]; in timeutils_days_in_month()
52 if (month == 2 && timeutils_is_leap_year(year)) { in timeutils_days_in_month()
60 mp_uint_t timeutils_year_day(mp_uint_t year, mp_uint_t month, mp_uint_t date) { in timeutils_year_day() argument
61 mp_uint_t yday = days_since_jan1[month - 1] + date; in timeutils_year_day()
62 if (month >= 3 && timeutils_is_leap_year(year)) { in timeutils_year_day()
130 mp_int_t month; in timeutils_seconds_since_2000_to_struct_time() local
131 for (month = 0; days_in_month[month] <= days; month++) { in timeutils_seconds_since_2000_to_struct_time()
132 days -= days_in_month[month]; in timeutils_seconds_since_2000_to_struct_time()
135 tm->tm_mon = month + 2; in timeutils_seconds_since_2000_to_struct_time()
147 mp_uint_t timeutils_seconds_since_2000(mp_uint_t year, mp_uint_t month, in timeutils_seconds_since_2000() argument
153 + (timeutils_year_day(year, month, date) - 1 in timeutils_seconds_since_2000()
161 mp_uint_t timeutils_mktime_2000(mp_uint_t year, mp_int_t month, mp_int_t mday, in timeutils_mktime_2000() argument
192 month--; // make month zero based in timeutils_mktime_2000()
193 year += month / 12; in timeutils_mktime_2000()
194 if ((month = month % 12) < 0) { in timeutils_mktime_2000()
195 month += 12; in timeutils_mktime_2000()
198 month++; // back to one based in timeutils_mktime_2000()
201 if (--month == 0) { in timeutils_mktime_2000()
202 month = 12; in timeutils_mktime_2000()
205 mday += timeutils_days_in_month(year, month); in timeutils_mktime_2000()
207 while ((mp_uint_t)mday > timeutils_days_in_month(year, month)) { in timeutils_mktime_2000()
208 mday -= timeutils_days_in_month(year, month); in timeutils_mktime_2000()
209 if (++month == 13) { in timeutils_mktime_2000()
210 month = 1; in timeutils_mktime_2000()
214 return timeutils_seconds_since_2000(year, month, mday, hours, minutes, seconds); in timeutils_mktime_2000()