Adjust birthday window

This commit is contained in:
Noah Petherbridge 2023-10-10 19:38:02 -07:00
parent 59338d510f
commit 16eca589e5

View File

@ -616,8 +616,8 @@ func (u *User) IsBirthday() bool {
var (
now, _ = time.Parse(time.DateOnly, time.Now().Format(time.DateOnly))
bday, _ = time.Parse(time.DateOnly, fmt.Sprintf("%d-%d-%d", now.Year(), u.Birthdate.Month(), u.Birthdate.Day()))
startDate = now.Add(-24 * time.Hour)
endDate = now.Add(24 * time.Hour)
startDate = now.Add(-36 * time.Hour)
endDate = now.Add(36 * time.Hour)
)
return bday.Before(endDate) && bday.After(startDate)