diff --git a/internal/app/app.go b/internal/app/app.go index c44a4d3..1a0ead0 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -105,7 +105,7 @@ func (a *App) daily() { if time.Now().Format("Monday") == a.settings.Scheduler.Announcements.Weekly { bdays, err := a.db.Birthdays().BirthdaysThisWeek(chat.ID) if err == nil && len(bdays) > 0 { - sb.WriteString("**Birthdays this week (Sunday-to-Sunday):**\n\n") + sb.WriteString("**Upcoming Birthdays (next 2 weeks):**\n\n") for _, bday := range bdays { d, derr := time.Parse("2006-01-02", bday.Birthdate) if derr == nil { diff --git a/internal/commands/birthdays.go b/internal/commands/birthdays.go index e62f378..8a7f99f 100644 --- a/internal/commands/birthdays.go +++ b/internal/commands/birthdays.go @@ -110,14 +110,12 @@ func (b *birthday) ListWeeklyBirthdays(ctx context.Context, cmd *cli.Command) er } return err } + logger.Info("Upcoming Birthdays (next 2 weeks):") + logger.Info("=======================================") if len(bdays) == 0 { - logger.Info("Birthdays this week (Sunday to Sunday):") - logger.Info("=======================================") logger.Info(" (none)") return nil } - logger.Info("Birthdays this week (Sunday to Sunday):") - logger.Info("=======================================") for _, bday := range bdays { d, err := time.Parse("2006-01-02", bday.Birthdate) if err != nil { diff --git a/internal/models/birthdays.go b/internal/models/birthdays.go index b1b77a2..26277c2 100644 --- a/internal/models/birthdays.go +++ b/internal/models/birthdays.go @@ -66,7 +66,7 @@ func (bm *BirthdayModel) BirthdaysThisWeek(chatid int64) ([]*Birthday, error) { chatid = ? and birthdate != date('now', 'localtime') and (birthdate >= date('now', 'localtime', 'weekday 0') and - birthdate <= date('now', 'localtime', 'weekday 0', '+7 days')) order by birthdate asc;` + birthdate <= date('now', 'localtime', 'weekday 0', '+14 days')) order by birthdate asc;` err := bm.db.SelectContext(bm.ctx, &bdays, q, chatid) if err != nil { var serr sqlite3.Error