get Day of gaving dat
var daysOfTheWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
function getDisplay(month, day, year) {
var d = new Date(year, month-1, day);
return day + '. ' + daysOfTheWeek[d.getDay()];
}
array_push($dates, getDisplay(7, 4, 2012));