title: Specify date format for Python argparse input arguments
body: <p>I have a Python script that requires some command line inputs and I am using <code>argparse</code> for parsing them. I found the documentation a bit confusing and couldn't find a way to check for a format in the input parameters. What I mean by checking format is explained with this example script:</p>
  <pre><code>parser.add_argument('-s', &quot;--startdate&quot;, help=&quot;The Start Date - format YYYY-MM-DD &quot;, required=True)
  parser.add_argument('-e', &quot;--enddate&quot;, help=&quot;The End Date format YYYY-MM-DD (Inclusive)&quot;, required=True)
  parser.add_argument('-a', &quot;--accountid&quot;, type=int, help='Account ID for the account for which data is required (Default: 570)')
  parser.add_argument('-o', &quot;--outputpath&quot;, help='Directory where output needs to be stored (Default: ' + os.path.dirname(os.path.abspath(__file__)))
  </code></pre>
  <p>I need to check for option <code>-s</code> and <code>-e</code> that the input by the user is in the format <code>YYYY-MM-DD</code>. Is there an option in <code>argparse</code> that I do not know of which accomplishes this?</p>