title: converting written date to date format in python
body: <p>I am using Python 2.7. </p>
  
  <p>I have an Adobe PDF form doc that has a date field. I extract the values using the  pdfminer function. The problem I need to solve is, the user in Adobe Acrobat reader is allowed to type in strings like <code>april 3rd 2017</code> or <code>3rd April 2017</code> or <code>Apr 3rd 2017</code> or <code>04/04/2017</code> as well as <code>4 3 2017</code>. Now the date field in Adobe is set to <code>mm/dd/yyyy</code> format, so when a user types in one of the values above, that is the actual value that pdfminer pulls, yet adobe will display it as <code>04/03/2017</code>, but when you click on the field is shows you the actual value like the ones above. Adobe allows this and then doing it's on conversion I think to display the date as <code>mm/dd/yyyy</code>. There is ability to use javascript with adobe for more control, but i can't do that the users can only have and use the pdf form without any accompanying javascript file.</p>
  
  <p>So I was looking to find a method with <code>datetime</code> in Python that would be able to accept a written date such as the examples above from a string and then convert them into a true <code>mm/dd/yyyy</code> format??? I saw methods for converting long and short month names but nothing that would handle day names like 1st,2nd,3rd,4th .</p>