blob: 544182cf8c1e5e43de2850f37bc5501cd5127183 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "DateTime.h"
DateTime::DateTime(unsigned char hour, unsigned char minute, unsigned char day, unsigned char month, unsigned short year) {
this->day = day;
this->month = month;
this->year = year;
}
int DateTime::compare(const DateTime& other) {
if (year < other.year || month < other.month || day < other.day || hour < other.hour || minute < other.minute)
return -1;
return year > other.year && month > other.month && day > other.day && hour > other.hour && minute > other.minute;
}
|