title: Ruby date format validation
body: <p>How I can verify that the date '2016-01-01' is in the right format (%Y-%m-%d).</p>
  
  <p>For example I want to get <code>true</code> or <code>false</code> if the date is in the right format.</p>
  
  <p>pseudo code:</p>
  
  <pre><code>if ('2016-01-01' == (%Y-%m-%d))
      puts date is valid
  else
      puts date is not valid
  end
  </code></pre>
  
  <p>Please help,</p>
  
  <p>Thanks!</p>