int dateDiff(const dateDate_t *a, const dateDate_t *b)
Return the difference, in days, between two dates.
int dateToJulianDay(const dateDate_t *d)
Return the Julian Day Number of d.
uint16_t year
Non-negative year.
Definition: date.h:71
unsigned long long uint64_t
Unsigned 64-bit integer.
Definition: base.h:171
Monday.
Definition: date.h:57
February.
Definition: date.h:39
int dateFromJulianDay(int jdn, dateDate_t *d)
Convert the Julian Day Number to the Gregorian calendar.
uint8_t mon
Month (see dateMonths_t)
Definition: date.h:70
dateMonths_t
Enumeration of months.
Definition: date.h:37
int dateTimeGet(dateTime_t *dt)
Return the current system date and time.
int dateTimeDiff(const dateTime_t *a, const dateTime_t *b)
Return the difference, in seconds, between two date times.
Wednesday.
Definition: date.h:59
int dateTimeIsValid(const dateTime_t *dt)
Checks if both time and date are valid.
A gregorian date.
Definition: date.h:68
Tuesday.
Definition: date.h:58
September.
Definition: date.h:46
Friday.
Definition: date.h:61
Sunday.
Definition: date.h:56
Saturday.
Definition: date.h:62
int dateSet(const dateDate_t *d)
Update the system date.
May.
Definition: date.h:42
June.
Definition: date.h:43
April.
Definition: date.h:41
uint8_t min
Minutes, range [0,59].
Definition: date.h:80
int dateTimeCompare(const dateTime_t *a, const dateTime_t *b)
Compare two date times.
dateWeekdays_t
Enumeration of days of a week.
Definition: date.h:55
int dateIsValid(const dateDate_t *d)
Checks if a date is valid.
int dateTimeSet(const dateTime_t *dt)
Update the system date and time.
uint64_t dateTimeGetMs(void)
Return an increasing count of milliseconds.
int dateTimeAddSeconds(dateTime_t *dt, int nsecs)
Add seconds to a given date and time.
unsigned short uint16_t
Unsigned 16-bit integer.
Definition: base.h:165
uint8_t day
Day of month, range [1,31].
Definition: date.h:69
uint8_t hour
Hour, range [0,23].
Definition: date.h:79
March.
Definition: date.h:40
January.
Definition: date.h:38
Larlib basic definitions.
November.
Definition: date.h:48
int dateCompare(const dateDate_t *a, const dateDate_t *b)
Compare two dates.
int dateGet(dateDate_t *d)
Return the current system date.
int dateAddDays(dateDate_t *d, int ndays)
Add a number of days to a given date.
December.
Definition: date.h:49
dateDate_t date
Date information.
Definition: date.h:78
int dateWeekday(const dateDate_t *d)
Return the weekday of a given date.
August.
Definition: date.h:45
int dateIsLeap(uint16_t year)
Return non-zero if given year number is a leap year.
uint8_t sec
Seconds, range [0,59].
Definition: date.h:81
October.
Definition: date.h:47
July.
Definition: date.h:44
unsigned char uint8_t
Unsigned 8-bit integer.
Definition: base.h:162
A gregorian date with time.
Definition: date.h:77
Thursday.
Definition: date.h:60