function getYesterdaysDate() {
var date = new Date();
date.setDate(date.getDate()-1);
return date.getDate() + '/' + (date.getMonth()+1) + '/' + date.getFullYear();
}function formatDate(d) {
if (!d) return null;
var date = d.getDate(), month = d.getMonth(), year = d.getFullYear();
return addZero(date)+"/"+addZero(month+1)+"/"+year;
}
function addZero(val) {
return val<10? "0"+val: val;
}
var d = new Date();
d.setDate(d.getDate() - 1);
formatDate(d);