JS wczoraj datę
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);