添加大于和小于日期,表示此方法可以很好地获得不合适的结果
//Fetching the Date
var date = new Date(), y = date.getFullYear(), m = date.getMonth(); //Storing Date in Variable
var firstDay = new Date(y, m, 1);
var lastDay = new Date(y, m + 1, 0);
//The Query for Comparison
var query = Feedback.find( {createdOn : {"$gte": firstDay , "$lt": lastDay}})