calendar comparison is not working
<p>i have written this code and its not working......   </p>

<p>indate = "13/1/2011"</p>

<pre><code>Calendar cd1 = Calendar.getInstance();
        String[] StartDate = split(inDate.trim(),"/");
        cd1.set(Calendar.DAY_OF_MONTH, Integer.parseInt(StartDate[0]));
        cd1.set(Calendar.MONTH, Integer.parseInt(StartDate[1]));
        cd1.set(Calendar.YEAR, Integer.parseInt(StartDate[2]));

currentDate ="14/1/2011"
        String CurrentDate = com.connection.loginscreen.currentDate;
        Calendar cd2 = Calendar.getInstance();
        String[] resultc = split(CurrentDate.trim(), "/");
        cd2.set(Calendar.YEAR, Integer.parseInt(resultc[2]));
        cd2.set(Calendar.MONTH, Integer.parseInt(resultc[0]));
        cd2.set(Calendar.DAY_OF_MONTH, Integer.parseInt(resultc[1]));

        if (cd1.before(cd2))
        {
            check ="1";
        }
</code></pre>

<p>it is not working.....</p>
