From 16eca589e5318b5e9e8a56076b8a4cf3fc110d74 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 10 Oct 2023 19:38:02 -0700 Subject: [PATCH] Adjust birthday window --- pkg/models/user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/models/user.go b/pkg/models/user.go index 3ac60e4..0067f88 100644 --- a/pkg/models/user.go +++ b/pkg/models/user.go @@ -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)