Bugfix "Not sending 'Todays Events'"

Format Month and Day with a Leading 0 for values between 1 to 9 when querying the DB for Todays Events only.
This commit is contained in:
2025-11-07 00:27:45 +00:00
parent ca102190ea
commit d5d2fa5836

View File

@@ -95,10 +95,10 @@ export class Event implements TEventEntity {
whereConditions.push( `notification IN ('${ options.notification.join("', '") }')` )
}
if ( options.date ) {
whereConditions.push(`date_at = "${options.date.year}-${options.date.month}-${options.date.day}"`);
whereConditions.push(`date_at = "${options.date.year}-${pad_l2(options.date.month)}-${pad_l2(options.date.day)}"`);
}
if ( options.month ) {
whereConditions.push( `strftime('%Y-%m', date_at) = '${options.month.year}-${options.month.month}'`)
whereConditions.push( `strftime('%Y-%m', date_at) = '${options.month.year}-${pad_l2(options.month.month)}'`)
}
const where = ( () => {