diff --git a/src/api/commons/queries/current-name.query.js b/src/api/commons/queries/current-name.query.js index 6a8ff0e1..c5f18a90 100644 --- a/src/api/commons/queries/current-name.query.js +++ b/src/api/commons/queries/current-name.query.js @@ -7,8 +7,8 @@ export default [ as: 'name', cond: { $and: [ - { $lte: ['$$name.startDate', '$NOW'] }, - { $gte: ['$$name.endDate', '$NOW'] }, + { $lte: ['$$name.startDate', new Date().toISOString().split('T')[0]] }, + { $gte: ['$$name.endDate', new Date().toISOString().split('T')[0]] }, ], }, },