From feb7de383da7dbff44cbc01c30752172394b9f3a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 1 May 2022 08:50:41 +0300 Subject: Autocommit at 01.05.2022 @ 08:50 --- src/DateTime/DateTime.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/DateTime/DateTime.cpp') diff --git a/src/DateTime/DateTime.cpp b/src/DateTime/DateTime.cpp index 448fefb..e8334a3 100644 --- a/src/DateTime/DateTime.cpp +++ b/src/DateTime/DateTime.cpp @@ -13,3 +13,42 @@ int DateTime::compare(const DateTime& other) { return -1; return year > other.year || month > other.month || day > other.day || hour > other.hour || minute > other.minute; } + + +unsigned short DateTime::get_hour() { + return hour; +} +bool DateTime::set_hour(unsigned short newHour) { + if (newHour > 23) + return false; + hour = newHour; + return true; +} + +unsigned short DateTime::get_minute() { + return minute; +} +bool DateTime::set_minute(unsigned short newMinute) { + if (newMinute > 59) + return false; + minute = newMinute; + return true; +} + +unsigned short DateTime::get_day() { + return day; +} +bool DateTime::set_day(unsigned short newDay) { + +} + +unsigned short get_month(); +bool set_month(unsigned short newMonth); + +unsigned short DateTime::get_year() { + return year; +} +bool DateTime::set_year(unsigned short newYear) { + year = newYear; + return true; +} -- cgit v1.3.1-23-gd82d