title: Getting last day of the month in a given string date
body: <p>My input string date is as below:</p>
  
  <pre><code>String date = "1/13/2012";
  </code></pre>
  
  <p>I am getting the month as below:</p>
  
  <pre><code>SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy");
  Date convertedDate = dateFormat.parse(date);
  String month = new SimpleDateFormat("MM").format(convertedDate);
  </code></pre>
  
  <p>But how do I get the last calendar day of the month in a given String date?</p>
  
  <p>E.g.: for a String <code>"1/13/2012"</code> the output must be <code>"1/31/2012"</code>.</p>