Birthday implementation (mostly working!).

This commit is contained in:
Benjamin A. Shelton 2026-10-23 23:26:48 -06:00
commit ff6aba11c6
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
2 changed files with 60 additions and 3 deletions

View file

@ -62,8 +62,9 @@ func (bm *BirthdayModel) BirthdaysThisWeek(chatid int64) ([]*Birthday, error) {
format('%02d', month), '-',
format('%02d', day))) as birthdate
from birthdays where
chatid = ? and (
birthdate >= date('now', 'localtime', 'weekday 0') and
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;`
err := bm.db.SelectContext(bm.ctx, &bdays, q, chatid)
if err != nil {