aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/Period.hpp
blob: c788be96a51348fb26f14e4ed6160541c232265a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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);
   };
}