Java Calendar 31st January issue
<p>I have the following code :-</p>

<pre><code>        Calendar calc = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("MMM-yyyy");
        calc.set(Calendar.YEAR, calc.get(Calendar.YEAR) - 1);
        calc.set(Calendar.MONTH, Calendar.NOVEMBER);
        System.out.println("---NOV? : " + sdf.format(calc.getTime()));

        Calendar calc1 = Calendar.getInstance();
        calc1.set(Calendar.YEAR, calc1.get(Calendar.YEAR) - 1);
        calc1.set(Calendar.MONTH, Calendar.DECEMBER);
        System.out.println("-- DEC : " + sdf.format(calc1.getTime()));
</code></pre>

<p>The output of the above code is :-</p>

<pre><code>&gt; ---NOV? : Dec-2012
&gt; -- DEC : Dec-2012
</code></pre>

<p>This happens only for 31st january, can someone explain why this might be happening?</p>
