diff options
Diffstat (limited to 'src/time.h')
-rwxr-xr-x | src/time.h | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1,5 +1,8 @@ #pragma once #include <iostream> +#include <sstream> +#include <ios> +#include <iomanip> struct moment{ signed int minutes; @@ -7,6 +10,10 @@ struct moment{ signed int day; signed int month; signed int year; + + bool operator<(const moment& other) const; + bool operator>(const moment& other) const; + bool operator=(const moment& other) const; }; struct timeblock{ @@ -14,16 +21,14 @@ struct timeblock{ moment end; }; -class day{ - -}; +std::string padint(const int input, const int minimum_signs); -timeblock timesplit(timeblock &input_block, moment splitpoint); +timeblock timesplit(timeblock &input_block, const moment splitpoint); // Splits a timeblock at splitpoint. // It changes the input_block to end at splitpoint, and returns a new timeblock // that lasts from splitpoint to where the input_block used to end. -void wind(moment &input_moment, int minutes, int hours, int days); +void wind(moment &input_moment, const int minutes, const int hours, const int days); int days_in(int month, int year); |