Jquery alert output issue
<p>This short piece of code displays the date of the first day of the current week. The format displayed in the alert box is a very long format. How do I format the date to get something like "12-1-2012".I broke my head trying to test things I read on other posts. Oh, and I would like to format the date but keep it as a date. No string. Nothing works. Hope someone can help. Thank you in advance for your replies. Cheers. Marc.</p>

<pre><code>var now = new Date();
var weekDay=new Date().getDay();
now.setDate(now.getDate()-(weekDay-1));
alert(now);
</code></pre>
