等于天的续集

时间:2019-05-16 05:37:55

标签: javascript node.js sequelize.js

我正在选择特定日期的日历,我传递了查询参数,并希望仅返回当天的结果。无论如何都可以在没有原始查询的情况下做到这一点?

if (query.hasOwnProperty('today') && query.today.length > 0) {
  today = query.today.replace(/%20/g, " ");

  // check for calendar selection to only show that days tasks
  if (query.hasOwnProperty('calendarSelect') && query.calendarSelect === 'true') {
    where.dueDate = {
      $eq: moment(today).toDate()
    };
  }
}

0 个答案:

没有答案