📜  日期范围过滤器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:04.655000             🧑  作者: Mango

代码示例1
var startDate = new Date("2015-08-04");
var endDate = new Date("2015-08-12");

var resultProductData = product_data.filter(a => {
  var date = new Date(a.ProductHits);
  return (date >= startDate && date <= endDate);
});
console.log(resultProductData)