blob: 448fefb472fd3e9c78928ad99d59fb7a371ded1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include "DateTime.h"
DateTime::DateTime(unsigned short hour, unsigned short minute, unsigned short day, unsigned short month, unsigned short year) {
this->hour = hour;
this->minute = minute;
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;
}
|