diff options
author | SanJacobs | 2022-04-15 17:12:20 +0200 |
---|---|---|
committer | SanJacobs | 2022-04-15 17:12:20 +0200 |
commit | d9d505865604a4d136e143dd5186ade0baaf452e (patch) | |
tree | e3c62b00898b631f07b93d3237a01fd7af23e32d /src | |
parent | 16947f5750c323f8d457f8942578a544bb35118e (diff) | |
download | satscalc-d9d505865604a4d136e143dd5186ade0baaf452e.tar.gz satscalc-d9d505865604a4d136e143dd5186ade0baaf452e.tar.bz2 satscalc-d9d505865604a4d136e143dd5186ade0baaf452e.zip |
Fixed year rollover in wind()
Diffstat (limited to 'src')
-rwxr-xr-x | src/time.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time.cpp b/src/time.cpp index d51f4ab..0d97a09 100755 --- a/src/time.cpp +++ b/src/time.cpp @@ -54,12 +54,12 @@ void wind(moment &input_moment, int minutes, int hours, int days) { } while(input_moment.day < 1) { input_moment.month--; - input_moment.day += days_in(input_moment.month, input_moment.year); if(input_moment.month < 1) { input_moment.month += 12; input_moment.year--; } current_month_length = days_in(input_moment.month, input_moment.year); + input_moment.day += current_month_length; } } |