JS Fecha de ayer
var yesterday = new Date((new Date()).valueOf() - 1000*60*60*24);
Hurt Hedgehog
var yesterday = new Date((new Date()).valueOf() - 1000*60*60*24);
var d = new Date();
d.setDate(d.getDate() - 1);
let today = new Date();
let yesterday = new Date();
yesterday.setDate(today.getDate() - 1);
console.log('Today: ' + today);
console.log('Yesterday: ' + yesterday);
var start = new Date();
start.setHours(0, 0, 0, 0);
start = start.getTime();
var end = new Date();
end.setHours(0, 0, 0, 0);
end.setDate(end.getDate() + 1);
end = end.getTime();