breaking dates out by the first day of each quarter
<p>I have a method right now that takes a date in string format like <code>YYYY-MM</code> and breaks it out to a quarter format like <code>Q1 2016</code>.</p>

<pre><code>var mth_dt = new Date(d.mth_dt).getMonth() + 1;
var quarter = Math.ceil(mth_dt / 3)
var yrq = d.mth_dt.substr(0,4).toString();
var qtrYr = "Q"+quarter+" "+yrq

//console.log("qtrYr: ", qtrYr);

return qtrYr;
</code></pre>

<p>what I was wondering now, is how do I get it to result in the 1st date of each quarter? For instance, <code>Q1 2016</code> would be <code>1/1/2016</code> and <code>Q2 2016</code> would be <code>4/1/2016</code>.</p>