updated week filter

This commit is contained in:
unknown 2015-07-23 11:54:13 +01:00
parent 98901a09c5
commit e1959965a6

View File

@ -6,14 +6,13 @@ module.exports = function (item, itemOptions, source) {
return parseInt((t2-t1)/(24*3600*1000)); return parseInt((t2-t1)/(24*3600*1000));
} }
console.log(itemOptions.date);
var now = new Date(); var now = new Date();
var then = new Date(itemOptions.date); var then = new Date(itemOptions.date);
var d = inDays(then,now); var d = inDays(then,now);
console.log(d); if (d <= 7)
return itemOptions; return itemOptions;
else
return -1;
}; };