updated week filter
This commit is contained in:
parent
98901a09c5
commit
e1959965a6
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user