Closed LukCaha closed 1 year ago
In function date2days move isLeapYear to FOR.
uint16_t DS3231::date2days(uint16_t year, uint8_t month, uint8_t day)
{
year = year - 2000;
uint16_t days16 = day;
for (uint8_t i = 1; i < month; ++i)
{
days16 += pgm_read_byte(daysArray + i - 1);
if ((month == i) && isLeapYear(year))
++days16;
}
return days16 + 365 * year + (year + 3) / 4 - 1;
}
will be fixed in 1.1.0 release
Hi, I testing your library but Day of the Year is incorrect. I try print this dates with DotY:
Same will be every leap-year. Please, can you fix it?