title: Java date parsing - works even in "wrong" cases
body: <p>In Java, I'm parsing date format:</p>
  
  <pre><code>DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
  DATE_FORMAT.parse(date);
  </code></pre>
  
  <p>This works fine for <code>"2014-12-31"</code>.</p>
  
  <p>However it will also parse dates like <code>"2014-13-33"</code> or <code>"01-01-2014"</code> when in these cases I would expect <code>ParseException</code>. Is there a way to make if fail (throw an error) for the later cases?</p>