title: Python: Handle different datetime format dynamically
body: <p>I have a different DateTime format coming in for Day, Week, Month, and Quarter. I would like to know if there is a way to handle it or I have to maintain a map of all possible DateTime formats.</p>
  <pre><code>       Input Format     || Output Format
  Day:     Oct 24         —&gt;  2021-10-24
  Week:    Week of Oct 18 —&gt;  2021-10-18
  Month:   Oct ’21        —&gt;  2021-10-01
  Quarter: 2021 Q3        —&gt;  2021-07-01
  </code></pre>
  <p>I know the <code>parser.parse</code> function from <code>dateutil</code> library. Using that I don't need to know what format of datetime string is, and it'll convert the string into datetime object. But that doesn't work here.</p>
  <p>So, if anyone knows any in-built function which I can use please let me know.</p>