Skip to main content

When to use qddate vs dateparser vs dateutil

Evaluators often ask which Python date parser to reach for. Short answer: qddate is a speed-first pattern matcher for scraped HTML bylines. Use the others when you want broader natural-language coverage or calendar math.

NeedPrefer
Extract dates from messy HTML at scale (12.03.1999 some text here)qddate
Parse almost any human-readable date in any language, including relative phrasesdateparser
Standard English / ISO / RFC strings, plus rrule and relativedeltadateutil
Chatbots, search bars, unconstrained user inputdateparser
Recurrence rules and date arithmeticdateutil
Minimal runtime dependencies (pyparsing only)qddate

qddate strengths

  • Speed: pre-generated pyparsing grammars, length/prefix/charset filters, no disk I/O at runtime
  • Dirty matching: left-aligned dates with trailing text are first-class
  • Determinism: if a pattern is in the catalog, it matches; if it is not, it fails
  • Light footprint: runtime depends on pyparsing only

When another library wins

  • dateparser: relative dates ("yesterday", "in 2 weeks"), ~200 locales, "it just works" user input
  • dateutil: battle-tested tokenizer for standard formats, rrule, relativedelta, calendar apps

Architectural snapshot

Featuredateutildateparserqddate
Primary goalRobust extensions to datetimeUniversal coverageHigh-throughput HTML dates
ApproachLexer + heuristicsLocale translation + heuristicsPattern matching + pre-filtering
Language supportEnglish + custom parserinfo~200 locales14 languages, manual patterns
Relative datesNo (math via relativedelta)YesNo
DependenciesLightHeavyLight (pyparsing)
Best forStandard apps, calendarsUser input, chatbotsWeb scraping, bulk corpora