'2026-07-28', '28/07/2026' and 'Jul 28, 2026'. Write parse_any(text) trying each format in that order with strptime, returning the date on first success or None when none fit — the try/except-per-format pattern.parse_any('28/07/2026')date(2026, 7, 28)
The second format matched.
Formats: '%Y-%m-%d', '%d/%m/%Y', '%b %d, %Y'.
Loop over the formats; return inside the try.