aboutsummaryrefslogtreecommitdiff
path: root/src/time.cpp
diff options
context:
space:
mode:
authorSanJacobs2022-04-15 17:20:37 +0200
committerSanJacobs2022-04-15 17:20:37 +0200
commit02369bb5b4f027d1f2545b7db6456d36a2c7d47a (patch)
tree6725a4cca2d35a6e55646de8d8eb1fab2ef2544d /src/time.cpp
parentd9d505865604a4d136e143dd5186ade0baaf452e (diff)
downloadsatscalc-02369bb5b4f027d1f2545b7db6456d36a2c7d47a.tar.gz
satscalc-02369bb5b4f027d1f2545b7db6456d36a2c7d47a.tar.bz2
satscalc-02369bb5b4f027d1f2545b7db6456d36a2c7d47a.zip
timeprint() can now handle timeblocks
Diffstat (limited to 'src/time.cpp')
-rwxr-xr-xsrc/time.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/time.cpp b/src/time.cpp
index 0d97a09..1262d57 100755
--- a/src/time.cpp
+++ b/src/time.cpp
@@ -75,6 +75,11 @@ std::string timeprint(moment input_moment) {
return output;
}
+std::string timeprint(timeblock input_timeblock) {
+ std::string output{timeprint(input_timeblock.start) + " --> " + timeprint(input_timeblock.end)};
+ return output;
+}
+
int days_in(int month, int year) {
// Kind of a stupid and slow way to do this
// But it's nice to have it as a function