From d5d2fa5836bfa7940b16cf7d6d6814c282921306 Mon Sep 17 00:00:00 2001 From: chiko Date: Fri, 7 Nov 2025 00:27:45 +0000 Subject: [PATCH] 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. --- src/component/event/events.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/event/events.ts b/src/component/event/events.ts index 5641d99..ffd8c06 100644 --- a/src/component/event/events.ts +++ b/src/component/event/events.ts @@ -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 = ( () => {