Skip to content
All projects
Core engineering libraryEngineer

date_utils.py — Date Parser & Power BI Calendar Generator

BCHPR · 2023 – present

3,746-line date engine handling 60+ formats, Excel serials, timezone conversion, and Power BI dimension tables with 99+ attributes (fiscal periods, holidays, relative categories, sort orders).

Highlights

  • 60+ date format patterns with priority / secondary / tertiary fallback (ISO · European · US · Excel · DICOM · RFC 2822).
  • Excel serial detection and conversion (e.g. 45,321 → 2024-01-15).
  • Power BI-ready dimension tables with fiscal quarters, holidays, relative categories, and sort orders.
  • Polars-first with pandas fallback; 3-10× speedup on 100k+ row datasets.
  • Statistical date outlier detection (IQR, Z-score, range) for data-entry error identification.