From 8e911a42f574201e864863a44e5c5c24eeee8a97 Mon Sep 17 00:00:00 2001 From: John Supplee Date: Fri, 26 Feb 2021 14:11:24 +0200 Subject: [PATCH] Fixes to due predicates --- client/components/main/globalSearch.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/components/main/globalSearch.js b/client/components/main/globalSearch.js index 176d6d375..526f744b6 100644 --- a/client/components/main/globalSearch.js +++ b/client/components/main/globalSearch.js @@ -368,7 +368,7 @@ BlazeComponent.extendComponent({ } else if (operator === 'dueAt' && value === 'overdue') { value = { operator: '$lt', - value: moment().format(), + value: moment(moment().format('YYYY-MM-DD')).format(), }; } else { this.parsingErrors.push({ @@ -380,15 +380,15 @@ BlazeComponent.extendComponent({ } else { if (operator === 'dueAt') { value = { - operator: '$lte', - value: moment() - .add(days, duration ? duration : 'days') + operator: '$lt', + value: moment(moment().format('YYYY-MM-DD')) + .add(days + 1, duration ? duration : 'days') .format(), }; } else { value = { operator: '$gte', - value: moment() + value: moment(moment().format('YYYY-MM-DD')) .subtract(days, duration ? duration : 'days') .format(), };