Problem with converting string to Calendar date in android
<p>I have the following program but it wrongly displays the month. please help.  </p>

<pre><code>        date1="31/12/2011";  
                SimpleDateFormat formatter = new SimpleDateFormat("dd/mm/yyyy");   
        try {    
            d1 = (Date)formatter.parse(date1);  
             System.out.println("dateeeeeeeeeeeeeeee " + date1);  

            tdy1=Calendar.getInstance();  
            System.out.println("tdy mnthhhhhhhhhhh " + tdy1.get(Calendar.MONTH));  
            tdy1.setTime(d1);  

        System.out.println("Month of date1= " + tdy1.get(Calendar.MONTH));    
        //catch exception 
    } catch (ParseException e) {   
            // TODO Auto-generated catch block  
            e.printStackTrace();   
        }   
</code></pre>

<p>And out put is :<br>
Month of date1= 0
Wat might be the problem??</p>
