diff options
author | wvpm <24685035+wvpm@users.noreply.github.com> | 2024-01-07 16:22:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-07 16:22:42 +0100 |
commit | 004abc9951d0a20d09027cde1d9b5b02bcc99fa0 (patch) | |
tree | af1d3ab4924675e14a24483dea9b012e235bf5ec /src/openvic-simulation/history/Period.hpp | |
parent | 199a1b7915f4c431e733cfe037608f1310972cb4 (diff) | |
parent | ddbb6af66e30e896f07a39503a1bb935e462c095 (diff) |
Merge pull request #121 from OpenVicProject/diplomatic_history_extension
Reparations & optional end date
Diffstat (limited to 'src/openvic-simulation/history/Period.hpp')
-rw-r--r-- | src/openvic-simulation/history/Period.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/openvic-simulation/history/Period.hpp b/src/openvic-simulation/history/Period.hpp new file mode 100644 index 0000000..c788be9 --- /dev/null +++ b/src/openvic-simulation/history/Period.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include <optional> +#include "openvic-simulation/types/Date.hpp" +#include "openvic-simulation/utility/Logger.hpp" + +namespace OpenVic { + struct Period { + private: + const Date start_date; + std::optional<Date> end_date; + + public: + Period(const Date new_start_date, const std::optional<Date> new_end_date); + bool is_date_in_period(const Date date) const; + bool try_set_end(const Date date); + }; +}
\ No newline at end of file |