aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/history/Period.hpp
blob: f59b16da79797c824d4f74e8441b56189cbf31d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <optional>

#include "openvic-simulation/types/Date.hpp"

namespace OpenVic {
   struct Period {
   private:
      const Date start_date;
      std::optional<Date> end_date;

   public:
      Period(Date new_start_date, std::optional<Date> new_end_date);

      bool is_date_in_period(Date date) const;
      bool try_set_end(Date date);
   };
}