如何判断日期是否为今天
May 04, 2018
function(timestamp){
let aDate = new Date(timestamp),
today = new Date(Date.now());
return aDate.toDateString() === today.toDateString();
}
May 04, 2018
function(timestamp){
let aDate = new Date(timestamp),
today = new Date(Date.now());
return aDate.toDateString() === today.toDateString();
}