daisy-model / daisy

Refactor of Daisy
GNU General Public License v2.0
5 stars 0 forks source link

Error in Time::wday #23

Open orting opened 6 months ago

orting commented 6 months ago

Week day is not calculated correctly by wday.

Time time0{2023, 12, 31, 0};
Time time1{2024, 1, 1, 0};
Time time2{2024, 1, 7, 0};

Assuming weekdays are Monday = 1 to Sunday = 7 we should have

time0.wday() == 7
time1.wday() == 1
time2.wday() == 7

But get

time0.wday() == 6
time1.wday() == 1
time2.wday() == 7