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:
@@ -95,10 +95,10 @@ export class Event implements TEventEntity {
|
|||||||
whereConditions.push( `notification IN ('${ options.notification.join("', '") }')` )
|
whereConditions.push( `notification IN ('${ options.notification.join("', '") }')` )
|
||||||
}
|
}
|
||||||
if ( options.date ) {
|
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 ) {
|
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 = ( () => {
|
const where = ( () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user