title: how to validate a date in python
body: <p>hi i would like to validate some date in python. but the problem is that i have a praticular range, for example, my date goes from <code>1/1/2014</code>to <code>08/07/2014</code> . So my question is how do i validate both the format and the value. i looked at this link but it only validates the format but not the specific values.</p>
  
  <pre><code>import time
  date = input('Date (mm/dd/yyyy): ')enter date here
  try:
      valid_date = time.strptime(date, '%m/%d/%Y')
  except ValueError:
      print('Invalid date!')
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/2216250/how-can-i-validate-a-date-in-python-3-x">How can I validate a date in Python 3.x?</a></p>