diff options
1 files changed, 4 insertions, 2 deletions
| -rw-r--r-- | src/DateTime/DateTime.cpp | 6 |
diff --git a/src/DateTime/DateTime.cpp b/src/DateTime/DateTime.cpp index 544182c..448fefb 100644 --- a/src/DateTime/DateTime.cpp +++ b/src/DateTime/DateTime.cpp @@ -1,6 +1,8 @@ #include "DateTime.h" -DateTime::DateTime(unsigned char hour, unsigned char minute, unsigned char day, unsigned char month, unsigned short year) { +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; @@ -9,5 +11,5 @@ DateTime::DateTime(unsigned char hour, unsigned char minute, unsigned char day, 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; + return year > other.year || month > other.month || day > other.day || hour > other.hour || minute > other.minute; } |
