device-epd/lib/datetime/datetime.h
2020-09-30 20:08:11 +02:00

22 lines
469 B
C

#ifndef DATETIME_H
#define DATETIME_H
#include <arduino.h>
#include <time.h>
// @see http://www.cplusplus.com/reference/ctime/tm/
// @see http://www.cplusplus.com/reference/ctime/strftime/
struct datetime_struct : tm
{
uint8_t month_num;
uint8_t day_offset; // 1st day of the month offset, Monday = 1, Sunnday = 0
uint8_t days_in_month;
};
extern RTC_DATA_ATTR struct datetime_struct now;
void setupDateTime();
void loopDateTime();
bool updateDateTime();
#endif