Skip to content

#263- standardize date and time using dateparser#264

Open
Cubix33 wants to merge 1 commit intofireform-core:mainfrom
Cubix33:normalize-dates
Open

#263- standardize date and time using dateparser#264
Cubix33 wants to merge 1 commit intofireform-core:mainfrom
Cubix33:normalize-dates

Conversation

@Cubix33
Copy link

@Cubix33 Cubix33 commented Mar 16, 2026

Closes #263

📝 Description

Implements a normalization utility that converts relative dates (e.g., "yesterday") and various date formats into a standardized DD-MM-YYYY format required by PDF templates.

🛠️ Changes Made

  • Created src/utils/normalizer.py using dateparser for robust string-to-date conversion.
  • Updated LLM.add_response_to_json() to intercept date-related fields and format them.
  • Added dateparser to project dependencies.

🧪 How to Test

  1. Provide a transcript containing "The incident happened last Monday."
  2. Verify the output JSON and PDF display the actual calendar date instead of the relative string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Standardized Date & Time Normalization Utility

1 participant