title: Date with SimpleDateFormat in Java
body: <p>The following code attempts to parse a date <code>31-Feb-2013 13:02:23</code> with a given format.</p>
  
  <pre><code>DateFormat dateFormat=new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
  System.out.println(dateFormat.parse("31-Feb-2013 13:02:23"));
  </code></pre>
  
  <p>It returns <code>Sun Mar 03 13:02:23 IST 2013</code>.</p>
  
  <p>I need to invalidate such dates indicating <em>invalid date</em>. This (and so forth) date shouldn't be parsed (or should be invalidated in any other way). Is this possible?</p>