SyntaxFix
Write A Post
Hire A Developer
Questions
This will produce yesterday at 00:00 with minutes precision
var d = new Date(); d.setDate(d.getDate() - 1); d.setTime(d.getTime()-d.getHours()*3600*1000-d.getMinutes()*60*1000);