Javascript calculation not correct
<p>i have a weird problem in my javascript, take a look at my code below:</p>

<pre><code>dateParts = document.getElementById('date').value.split('/');
newDays = 14;
year = dateParts[2];
month = parseInt(dateParts[1]) - 1;
day = parseInt(dateParts[0]) + parseInt(newDays);
alert(dateParts[0]+" + "+newDays+" = "+day);
</code></pre>

<p>and assume <code>document.getElementById('date') = 07/01/2013</code></p>

<p>the calculation will give a correct result = <code>07 + 14 = 21</code></p>

<p>the calculation work fine at all date, except for <code>08/01/2013</code> / <code>09/01/2013</code> </p>

<p>which the result is <code>08 + 14 = 14</code>, any idea whats wrong here?</p>
