title: Given a Date Object how do I determine the last day of its month?
body: <p>I'm trying to use the following code but it's returning the wrong day of month.</p>
  
  <pre><code>Calendar cal = Calendar.getInstance();
  cal.setTime(sampleDay.getTime());
  cal.set(Calendar.MONTH, sampleDay.get(Calendar.MONTH)+1);
  cal.set(Calendar.DAY_OF_MONTH, 0);
  return cal.getTime();
  </code></pre>