Birthday implementation (mostly working!).
This commit is contained in:
parent
ab0c96b33f
commit
ff6aba11c6
2 changed files with 60 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue