Lines Matching refs:year
121 uint_t year, month, day, hour, min, sec; in pc_tvtopct() local
133 for (year = YEAR_ZERO; unixtime >= days_in_year(year) * 86400; in pc_tvtopct()
134 year++) in pc_tvtopct()
135 unixtime -= 86400 * days_in_year(year); in pc_tvtopct()
137 if (year > 127 + YEAR_ZERO) { in pc_tvtopct()
145 for (month = 1; unixtime >= 86400 * days_in_month(month, year); in pc_tvtopct()
147 unixtime -= 86400 * days_in_month(month, year); in pc_tvtopct()
149 year -= YEAR_ZERO; in pc_tvtopct()
162 PC_DPRINTF3(1, "ux2pc date: %d.%d.%d\n", day, month, YEAR_ZERO + year); in pc_tvtopct()
166 ASSERT(year >= 0 && year < 128); in pc_tvtopct()
168 ASSERT(day >= 1 && day <= days_in_month(month, year)); in pc_tvtopct()
176 LE_16(year << YEARSHIFT | month << MONSHIFT | day << DAYSHIFT); in pc_tvtopct()
192 uint_t year, month, day, hour, min, sec; in pc_pcttotv() local
199 year = (LE_16(pctp->pct_date) >> YEARSHIFT) & YEARMASK; in pc_pcttotv()
200 year += YEAR_ZERO; in pc_pcttotv()
207 year = YEAR_ZERO; in pc_pcttotv()
212 day < 1 || day > days_in_month(month, year) || in pc_pcttotv()
216 day, month, year, hour, min, sec); in pc_pcttotv()
221 PC_DPRINTF3(1, "pc2ux date: %d.%d.%d\n", day, month, year); in pc_pcttotv()
230 *unixtime += 86400 * (int64_t)days_in_month(month, year); in pc_pcttotv()
232 while (year > YEAR_ZERO) { in pc_pcttotv()
233 year--; in pc_pcttotv()
234 *unixtime += 86400 * (int64_t)days_in_year(year); in pc_pcttotv()