Mercurial > minori
comparison src/include/date.h @ 2:23d0d9319a00
Update
Also converted everything to LF from CRLF
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Sat, 12 Aug 2023 03:16:26 -0400 |
| parents | |
| children | 1d82f6e04d7d |
comparison
equal
deleted
inserted
replaced
| 1:1ae666fdf9e2 | 2:23d0d9319a00 |
|---|---|
| 1 #ifndef __date_h | |
| 2 #define __date_h | |
| 3 #include <cstdint> | |
| 4 #include <QDate> | |
| 5 class Date { | |
| 6 public: | |
| 7 Date(); | |
| 8 Date(int32_t y); | |
| 9 Date(int32_t y, int8_t m, int8_t d); | |
| 10 void SetYear(int32_t y); | |
| 11 void SetMonth(int8_t m); | |
| 12 void SetDay(int8_t d); | |
| 13 int32_t GetYear(); | |
| 14 int8_t GetMonth(); | |
| 15 int8_t GetDay(); | |
| 16 QDate GetAsQDate(); | |
| 17 | |
| 18 private: | |
| 19 int32_t year = -1; | |
| 20 int8_t month = -1; | |
| 21 int8_t day = -1; | |
| 22 }; | |
| 23 #endif // __date_h |
