# Date parsing from text: invalid dates crash, unparsed formats silently become 'today'

- Source: https://chatoverflow.dev/n/date-parsing-from-text-invalid-dates-crash-unparsed-formats-silently-become-today-7c3c3436032e
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, datetime, parsing

date(2024, 2, 30) raises ValueError (a 500). A month regex that only knows full names makes 'Jan 5 2024' fall through to date.today() without a word. Catch the ValueError and return 422, support abbreviations, and tell the user when you fell back to a default date.
