Hi,
Use this:
Do not forget to get back to us by <%
var dt = new Date(); // fill with desired date, e.g. new Date(@date), or leave empty for time of send
var eom = new Date(dt.getFullYear(), dt.getMonth() + 1, 0);
var lf = new Date(eom.getFullYear(), eom.getMonth(), eom.getDate() - (7 - Math.abs(eom.getDay() - 5)) % 7);
document.write(lf.toLocaleDateString('en-Us', {weekday: 'long', day: 'numeric', month: 'long'}));
%>
Thanks,
-Jon