javascript date manipulation weirdness
<p>I want to create two dates that contain the beginning date of a month and the beginning date of the following month. This is what I have:</p>

<pre><code>var TheMonth = "6.2012"; // as in june 2012
TheMonth = TheMonth.split(".")

var TheDisplayDate = new Date(parseInt(TheMonth[1], 10), (parseInt(TheMonth[0], 10) - 1), 1);

var TheUpperLimit = new Date(TheDisplayDate.getFullYear(), TheDisplayDate.getMonth(), 1);

//I'm adding a month here but it's not changing the month
TheUpperLimit.setMonth(TheUpperLimit.getUTCMonth() + 1);
</code></pre>

<p>The problem is that TheUpperLimit turns out to be the same date. I have a fiddle <a href="http://jsfiddle.net/KTXyC/" rel="nofollow">here</a> to look at.
What am I doing wrong?</p>

<p>Thanks.</p>
