aboutsummaryrefslogtreecommitdiff
path: root/src/time.h
diff options
context:
space:
mode:
authorSan Jacobs2022-08-22 12:17:25 +0200
committerSan Jacobs2022-08-22 12:17:25 +0200
commit3bbc5ceb635a344d413e65249b4a33b0ed30feab (patch)
treeb2f847a8e041906cc4fa3b892d07f33d6f8cdcba /src/time.h
parentb604893e748485d6c9aa4eeb6d40ba432ed052c6 (diff)
downloadsatscalc-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-xsrc/time.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/time.h b/src/time.h
index efade95..b9a17d0 100755
--- a/src/time.h
+++ b/src/time.h
@@ -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);