title: How to check if a string is a valid date
body: <p>I have a string: <code>"31-02-2010"</code> and want to check whether or not it is a valid date.
  What is the best way to do it?</p>
  
  <p>I need a method which which returns true if the string is a valid date and false if it is not.</p>