Website Summary Files Commits Branches @commit @diff @stats
path: root / src / DateTime / DateTime.cpp
diff options
context:
space:
mode:
Commitbdf33676953751811f382c9dfbd73d55bcdfc6c5 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-01 08:45:39 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-01 08:45:39 +0300
Files3776587a6ee37d187a3f7adde192ff9f325e7d5a /src/DateTime/DateTime.cpp
FMI-OOP-P1_TicketSystem-bdf33676953751811f382c9dfbd73d55bcdfc6c5.tar
FMI-OOP-P1_TicketSystem-bdf33676953751811f382c9dfbd73d55bcdfc6c5.tar.gz
FMI-OOP-P1_TicketSystem-bdf33676953751811f382c9dfbd73d55bcdfc6c5.zip
Parent1a3226cf3ae0c986317a870401a2eba29a8129ad (diff)
Autocommit at 01.05.2022 @ 08:45
1 files changed, 4 insertions, 2 deletions
-rw-r--r--src/DateTime/DateTime.cpp6
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;
}