Skip to content

Commit

Permalink
avoid day0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigma88 committed Dec 5, 2019
1 parent 0c897f9 commit 3d5a5cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kronometer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public virtual Date GetDate(double time)
double timeThisYear = MOD(time, loader.Clock.year.value) + CarryOverThisYear;

// Current Day of the year
int day = (int)Math.Floor(timeThisYear / loader.Clock.day.value.Value) - (int)Math.Ceiling(CarryOverThisYear / loader.Clock.day.value.Value);
int day = (int)Math.Floor(timeThisYear / loader.Clock.day.value.Value);

// Time left to count
double left = MOD(time, loader.Clock.day.value);
Expand Down

0 comments on commit 3d5a5cb

Please sign in to comment.