/* The number of days since January 1. (0 to 365)  */
int rtc_year_days(unsigned int day, unsigned int month, unsigned int year)
/* The number of days since January 1. (0 to 365)  */
int rtc_year_days(unsigned int day, unsigned int month, unsigned int year)
{
	return rtc_ydays[is_leap_year(year)][month] + day-1;
}