Try this. It will get the "0th" day of the month, which is really the last day of the prior month.<%
var d = new Date()
var m = d.getMonth()
var y = d.getFullYear()
var lastDate = new Date(y, m + 1, 0);
var dateString = formatDate(lastDate,"%2D %Bl %4Y")
document.write(dateString)
%>