Use the getDate and getMonth methods to get the date and month respectively:
Code:
var monthNames = ["January", "February", "March",
"April", "May", "June", "July", "August", "September",
"October", "November", "December"];
var date = new Date();
var currentDate = date.getDate();
var currentMonth = date.getMonth();
alert( monthNames[currentMonth] + " " + currentDate );
So instead of returning dateObject.toLocaleDateString() from addDate you would return monthNames[dateObject.getMonth()] + " " + dateObject.getDate()
Bookmarks