aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/Period.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvic-simulation/history/Period.hpp')
-rw-r--r--src/openvic-simulation/history/Period.hpp18
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