From bdf33676953751811f382c9dfbd73d55bcdfc6c5 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 1 May 2022 08:45:39 +0300 Subject: Autocommit at 01.05.2022 @ 08:45 --- src/DateTime/DateTime.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/DateTime/DateTime.cpp') 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; } -- cgit v1.3.1-23-gd82d