Make sure we don't get todays values

This commit is contained in:
idanoo 2023-02-13 08:15:45 +13:00
parent 5a073e5232
commit 31ad65d711
Signed by: idanoo
GPG key ID: 387387CDBC02F132
2 changed files with 21 additions and 0 deletions

View file

@ -22,6 +22,7 @@ func getStartofDayMonday() time.Time {
}
// Iterate until Monday!
t := time.Now().In(localTime)
t = t.AddDate(0, 0, -1)
for t.Weekday() != time.Monday {
t = t.AddDate(0, 0, -1)
}