diff options
author | San Jacobs | 2022-08-22 12:17:25 +0200 |
---|---|---|
committer | San Jacobs | 2022-08-22 12:17:25 +0200 |
commit | 3bbc5ceb635a344d413e65249b4a33b0ed30feab (patch) | |
tree | b2f847a8e041906cc4fa3b892d07f33d6f8cdcba /src/time.h | |
parent | b604893e748485d6c9aa4eeb6d40ba432ed052c6 (diff) | |
download | satscalc-3bbc5ceb635a344d413e65249b4a33b0ed30feab.tar.gz satscalc-3bbc5ceb635a344d413e65249b4a33b0ed30feab.tar.bz2 satscalc-3bbc5ceb635a344d413e65249b4a33b0ed30feab.zip |
Completed ruleset! Just testing left before alpha!
Diffstat (limited to 'src/time.h')
-rwxr-xr-x | src/time.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -5,6 +5,7 @@ #include <iomanip> #include <string.h> #include <algorithm> +#include <math.h> enum weekday{ monday, @@ -17,9 +18,9 @@ enum weekday{ }; struct delta{ - unsigned int minutes; - unsigned int hours; - unsigned int days; + signed int minutes; + signed int hours; + signed int days; }; std::ostream& operator<<(std::ostream& stream, const delta& other); @@ -31,6 +32,7 @@ struct moment{ signed int year; weekday getweekday(); + bool isEaster(); bool operator<(const moment& other) const; bool operator>(const moment& other) const; @@ -95,6 +97,8 @@ void wind(moment& input_moment, const delta& time_delta); int days_in(const int month, const int year); +moment gaussEaster(int year); + std::string timeprint(const moment input_moment); std::string timeprint(const moment input_moment, bool clockonly); std::string timeprint(const timeblock input_timeblock); |