Suppose I have the following query:
post.getSpecificDateRangeJobs = function(queryData, callback) {
var matchCriteria = queryData.matchCriteria;
var currentD
As I understood, I can suggest you following general query. Modify this according to your need.
db.getCollection('vacancy')
.aggregate([{$match: { $and: [
{publishDate:{ $gte: new Date(2017, 4, 13) }} ,
{publishDate:{ $lte: new Date(2017, 4, 14) }}
]} }])
Summary: