aboutsummaryrefslogtreecommitdiff
path: root/src/openvic/Date.hpp
diff options
context:
space:
mode:
author Hop311 <hop3114@gmail.com>2023-05-24 01:21:41 +0200
committer Hop311 <hop3114@gmail.com>2023-05-24 01:21:41 +0200
commit3daa1e17cdfa302b4436d7635ad3a7d1a6f4da1c (patch)
tree60380b625c5e49ac535fd1208939511eb15ac5e3 /src/openvic/Date.hpp
parent35b038fe91d4f3c4b3ffdc4f48385ac3b2082664 (diff)
Date fix + Logger queuing
Diffstat (limited to 'src/openvic/Date.hpp')
-rw-r--r--src/openvic/Date.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openvic/Date.hpp b/src/openvic/Date.hpp
index 151b4e5..f616e3b 100644
--- a/src/openvic/Date.hpp
+++ b/src/openvic/Date.hpp
@@ -46,14 +46,17 @@ namespace OpenVic {
static constexpr Timespan::day_t MONTHS_IN_YEAR = 12;
static constexpr Timespan::day_t DAYS_IN_YEAR = 365;
- static constexpr Timespan::day_t DAYS_IN_MONTH[MONTHS_IN_YEAR] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
- static constexpr Timespan::day_t DAYS_UP_TO_MONTH[MONTHS_IN_YEAR] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
+ static constexpr Timespan::day_t DAYS_IN_MONTH[MONTHS_IN_YEAR] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ static Timespan::day_t const* DAYS_UP_TO_MONTH;
+ static month_t const* MONTH_FROM_DAY_IN_YEAR;
private:
// Number of days since Jan 1st, Year 0
Timespan timespan;
static Timespan _dateToTimespan(year_t year, month_t month, day_t day);
+ static Timespan::day_t const* generate_days_up_to_month();
+ static month_t const* generate_month_from_day_in_year();
public:
// The Timespan is considered to be the number of days since Jan 1st, Year 0