1
Fork 0
This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
UOC_PP20211_PR/UOCContacts/include/date.h
2021-10-19 20:04:13 +02:00

28 lines
No EOL
622 B
C

#ifndef __DATE_H__
#define __DATE_H__
#include <stdbool.h>
typedef struct _tDate {
int day;
int month;
int year;
} tDate;
typedef struct _tTime {
int hour;
int minutes;
} tTime;
typedef struct _tDateTime {
tDate date;
tTime time;
} tDateTime;
// Parse a tDateTime from string information
void dateTime_parse(tDateTime* dateTime, const char* date, const char* time);
// Compare two tDateTime structures and return true if they contain the same value or false otherwise.
bool dateTime_cmp(tDateTime dateTime1, tDateTime dateTime2);
#endif // __DATE_H__