Fix august 2021

This commit is contained in:
Peter Stuifzand 2021-08-11 19:56:58 +02:00
parent 27200abc58
commit 4c2834f57c

View File

@ -388,8 +388,13 @@ func prepareDays(t time.Time) []Day {
var days []Day
curDate := t.AddDate(0, 0, -t.Day()+1)
preDays := int(curDate.Weekday()) - 1
curDate := t.AddDate(0, 0, -(t.Day()-1))
preDays := int(curDate.Weekday())
if preDays == 0 {
preDays = 7
}
preDays -= 1
maxDays := daysInMonth(curDate.Year(), curDate.Month())
endOfMonth := false