Skip to content

fix(nlp): add support for "end of year" date parsing in fallback extractor#702

Open
shivambind269-ai wants to merge 1 commit into
Charushi06:mainfrom
shivambind269-ai:fix-end-of-year-nlp
Open

fix(nlp): add support for "end of year" date parsing in fallback extractor#702
shivambind269-ai wants to merge 1 commit into
Charushi06:mainfrom
shivambind269-ai:fix-end-of-year-nlp

Conversation

@shivambind269-ai
Copy link
Copy Markdown

Related Issue

Closes #675

Summary

Adds support for parsing the phrase "end of year" in the server-side NLP fallback extractor when the Gemini API is unavailable.

Changes Made

  • Added regex handling for "end of year" and "end of the year" inside nlpExtractDate()
  • Aligned backend fallback behavior with frontend NLP parsing logic
  • Ensured deadlines correctly resolve to December 31 of the current year

Testing

  • Tested locally by disabling GEMINI_API_KEY
  • Verified that phrases like "Submit report by end of year" now resolve correctly
  • Confirmed existing date parsing behavior remains unchanged

Screenshots

No UI changes.

Checklist

  • Code follows project style
  • Tested locally
  • No unrelated changes included
  • Documentation updated (if applicable)

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.

Bug: "end of year" phrase not handled in server-side NLP fallback

1 participant