with the help of new Date() how i can achieve this. my code :
var temp =new Date(\"October 13, 2014 22:34:17\"); console.log(new Date(temp-1));
You can simply subtract one day from today date like this:
var yesterday = new Date(new Date().setDate(new Date().getDate()-1));