title: C++ check if a date is valid
body: <p>is there any function to check if a given date is valid or not?
  I don't want to write anything from scratch.</p>
  
  <p>e.g. 32/10/2012 is not valid
  and 10/10/2010 is valid</p>