Change date format in javascript (jquery)
<p>I have two dates:</p>

<pre><code>var first = '21-11-2012';
var second = '03-11-2012';
</code></pre>

<p>What is the best way to format it like this:</p>

<pre><code>var first = '2012-11-21';
var second = '2012-11-03';
</code></pre>

<p>Should I use jQuery or simply JavaScript?</p>
