Skip to content

fix: nlpStartOf() sets time to 00:00 instead of 23:59#924

Open
vipul674 wants to merge 1 commit into
Charushi06:mainfrom
vipul674:fix/issue-923
Open

fix: nlpStartOf() sets time to 00:00 instead of 23:59#924
vipul674 wants to merge 1 commit into
Charushi06:mainfrom
vipul674:fix/issue-923

Conversation

@vipul674
Copy link
Copy Markdown

Summary

  • Fixed nlpStartOf() in server.js to set time to 00:00:00 instead of 23:59:00
  • All NLP-extracted task due dates now correctly use start-of-day timestamps

Problem

The nlpStartOf() helper was setting d.setHours(23, 59, 0, 0) — the end of the day — despite its name implying start-of-day. This caused every task extracted via the NLP fallback parser to have due_at at 23:59 instead of 00:00.

Fix

// Before
d.setHours(23, 59, 0, 0);

// After
d.setHours(0, 0, 0, 0);

Impact

  • Task sorting and calendar display now use correct start-of-day semantics
  • Deadline comparisons work as expected for NLP-extracted tasks
  • Affects the NLP fallback path (when Gemini API is unavailable or fails)

Fixes #923

The nlpStartOf() helper was incorrectly setting hours to 23 and minutes
to 59, causing all NLP-extracted task due dates to be end-of-day instead
of start-of-day. Changed to setHours(0, 0, 0, 0) for correct semantics.

Fixes Charushi06#923
@vipul674
Copy link
Copy Markdown
Author

vipul674 commented Jun 1, 2026

@Charushi06 please review the pr

@vipul674
Copy link
Copy Markdown
Author

vipul674 commented Jun 2, 2026

@Charushi06 review reminder

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: nlpStartOf() sets time to 23:59 instead of 00:00, causing all NLP-extracted due dates to be end-of-day

1 participant