我有一组日期存储在列表中:
var dateList = {
Wed Jun 06 2018 09:16:04 GMT+0530 (India Standard Time),
Thu Jun 07 2018 09:43:50 GMT+0530 (India Standard Time),
Thu Jun 07 2018 09:47:57 GMT+0530 (India Standard Time),
我想过滤过去1小时的数据, 我尝试了以下条件,但它无法正常工作,
var currentTime = new Date();
var hourago = new Date(currentTime.getTime(1000 * 60 * 60));
var newLastOccurred = '';
filteredAppliedData = this.FilterData.filter(function (filterData) {
return newLastOccurred >= hourago;
});
有人可以帮帮我吗?