Mercurial > minori
diff src/include/date.h @ 6:1d82f6e04d7d
Update: add first parts to the settings dialog
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Wed, 16 Aug 2023 00:49:17 -0400 |
parents | 23d0d9319a00 |
children |
line wrap: on
line diff
--- a/src/include/date.h Sat Aug 12 13:10:34 2023 -0400 +++ b/src/include/date.h Wed Aug 16 00:49:17 2023 -0400 @@ -1,23 +1,27 @@ -#ifndef __date_h -#define __date_h -#include <cstdint> -#include <QDate> -class Date { - public: - Date(); - Date(int32_t y); - Date(int32_t y, int8_t m, int8_t d); - void SetYear(int32_t y); - void SetMonth(int8_t m); - void SetDay(int8_t d); - int32_t GetYear(); - int8_t GetMonth(); - int8_t GetDay(); - QDate GetAsQDate(); - - private: - int32_t year = -1; - int8_t month = -1; - int8_t day = -1; -}; -#endif // __date_h \ No newline at end of file +#ifndef __date_h +#define __date_h +#include <cstdint> +#include <QDate> +class Date { + public: + Date(); + Date(int32_t y); + Date(int32_t y, int8_t m, int8_t d); + void SetYear(int32_t y); + void SetMonth(int8_t m); + void SetDay(int8_t d); + int32_t GetYear() const; + int8_t GetMonth() const; + int8_t GetDay() const; + QDate GetAsQDate(); + bool operator< (const Date& other) const; + bool operator> (const Date& other) const; + bool operator<= (const Date& other) const; + bool operator>= (const Date& other) const; + + private: + int32_t year = -1; + int8_t month = -1; + int8_t day = -1; +}; +#endif // __date_h