diff options
author | hop311 <hop3114@gmail.com> | 2023-10-31 02:11:47 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-11-07 19:33:42 +0100 |
commit | c1b7cab254ac14a173477661047ad2492930ff8b (patch) | |
tree | 3fd965559fb97c7a2f2245952ab531afec84bc93 /src/openvic-simulation/types/Date.hpp | |
parent | e91ce707b2c0e80591b9fd1b6a5215e6e6989df8 (diff) |
History loading changes + PROPERTY macro
Diffstat (limited to 'src/openvic-simulation/types/Date.hpp')
-rw-r--r-- | src/openvic-simulation/types/Date.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openvic-simulation/types/Date.hpp b/src/openvic-simulation/types/Date.hpp index c3fee15..b6e693c 100644 --- a/src/openvic-simulation/types/Date.hpp +++ b/src/openvic-simulation/types/Date.hpp @@ -4,9 +4,11 @@ #include <ostream> #include <string> +#include "openvic-simulation/utility/Getters.hpp" + namespace OpenVic { // A relative period between points in time, measured in days - struct Timespan { + struct Timespan : ReturnByValueProperty { using day_t = int64_t; private: @@ -44,7 +46,7 @@ namespace OpenVic { // Represents an in-game date // Note: Current implementation does not account for leap-years, or dates before Year 0 - struct Date { + struct Date : ReturnByValueProperty { using year_t = uint16_t; using month_t = uint8_t; using day_t = uint8_t; |