From e2bf6f0959ebc481ee1cec6d60ff14c392db86dc Mon Sep 17 00:00:00 2001 From: Pierre Ecarlat <pecarlat@grandlyon.com> Date: Wed, 18 Sep 2024 14:45:12 +0000 Subject: [PATCH] fix: fetch three years minus a day --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 402f72b..fe64430 100644 --- a/src/index.js +++ b/src/index.js @@ -56,8 +56,8 @@ moment.tz.setDefault('Europe/Paris') // set the timezone /** Connector Constants **/ const manualExecution = process.env.COZY_JOB_MANUAL_EXECUTION === 'true' let startDate = manualExecution - ? moment().subtract(12, 'month') - : moment().subtract(36, 'month') + ? moment().subtract(12, 'month').add(1, 'day') + : moment().subtract(36, 'month').add(1, 'day') let startDateString = startDate.format('YYYY-MM-DD') const startHalfHourDate = moment().subtract(7, 'day') const endDate = moment() -- GitLab