Error calculating dates with Date.getTime()
<p>I've got this code:</p>

<pre><code>f_sal = new Date( f_sal.getFullYear(), f_sal.getMonth(), f_sal.getDate() ); 
f_reg = new Date( f_reg.getFullYear(), f_reg.getMonth(), f_reg.getDate() ); 

var unDia = 1000 * 60 * 60 * 24;
difDias = Math.round((f_reg.getTime() - f_sal.getTime()) / unDia );
</code></pre>

<p>If f_sal value is 6/9/2012 and f_reg value is 7/9/2012, difDias value is 1 day (correct). But if f_reg value is 6/10/2012, difDias value is 31 days... The right result would be 30 days.</p>

<p>Where's my fault?</p>
