 <p>Use <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Calendar.html#getActualMaximum%28int%29" rel="nofollow"><code>Calendar.getActualMaximum()</code></a></p> <p>To get the max date of the month</p> <pre><code>cal.getActualMaximum(Calendar.DAY_OF_MONTH) </code></pre> <p>and for minimum</p> <pre><code>cal.getActualMinimum(Calendar.DAY_OF_MONTH) </code></pre> <p><strong>Note :</strong> <code>cal</code> is an instance of <code>Calendar</code></p> <p></p>