//Add the following function to RTClib.cpp: //Baldarn and Edo //http://hack.lenotta.com // uint8_t DateTime::dayOfYear() const { uint16_t days = d; for (uint8_t i = 1; i < m; ++i) days += pgm_read_byte(daysInMonth + i - 1); if (m > 2 && yOff % 4 == 0) ++days; return days; }