Skip to content

fix: correct midnight parsing to 00:00#1166

Open
agarwalpranav0711 wants to merge 1 commit into
Charushi06:mainfrom
agarwalpranav0711:verify/nlp-midnight-fix
Open

fix: correct midnight parsing to 00:00#1166
agarwalpranav0711 wants to merge 1 commit into
Charushi06:mainfrom
agarwalpranav0711:verify/nlp-midnight-fix

Conversation

@agarwalpranav0711

Copy link
Copy Markdown

Related Issue

Closes #1165

Summary

This PR fixes an issue where the NLP time parser incorrectly maps midnight to 23:59.

Midnight represents the start of a day (00:00), but the current implementation interprets it as one minute before the next day (23:59).

Changes Made

  • Updated midnight parsing in server.js
  • Updated midnight parsing in js/utils/nlpDateExtractor.js
  • Changed:
{ hours: 23, minutes: 59 }

to:

{ hours: 0, minutes: 0 }

Testing

  • Verified parser behavior for midnight
  • Verified changes in both server-side and client-side parser implementations
  • Verified no unrelated files were modified
  • Existing tests pass

Screenshots

N/A

Checklist

  • Tested locally
  • Linked related issue
  • No breaking changes introduced

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: nlpExtractTime() maps "midnight" to 23:59 instead of 00:00

1 participant