Fix august 2021
This commit is contained in:
parent
27200abc58
commit
4c2834f57c
9
main.go
9
main.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user