Repository navigation
fix: show correct day for deadlines in every timezone - #23
Merged
abhishekgoswami0720 merged 3 commits intoNov 11, 2026
Merged
abhishekgoswami0720 merged 3 commits into
abhishekgoswami0720 merged 3 commits into
Conversation
Contributor
Author
|
Hi maintainers, I’ve completed the fix for Issue #8 and updated the documentation in docs/FLOW.md as well. The latest changes have been pushed to PR #23. However, GitHub Actions appears to require workflow approval before CI checks can run. Could a maintainer please review the PR and approve the workflow run? Thank you! |
abhishekgoswami0720
approved these changes
Nov 11, 2026
abhishekgoswami0720
left a comment
Collaborator
There was a problem hiding this comment.
This is a really clean first PR, @abhinna123. Thank you! 🎉
What I liked:
- One shared helper instead of three copies of the date math
- Tests for exactly the cases that broke (early morning IST, late evening PST, DST, leap day)
- You also caught the "1 days left" plural bug
Two small notes, no changes needed for this PR:
daysUntil()takes the date part of a full timestamp as written, so the timezone offset is ignored. That's fine today because deadlines are saved as plain dates. Worth knowing if it's ever used for timestamps.- Could you tick the CONTRIBUTING and FLOW.md boxes in the PR description? You did both in your last commit.
Approving and merging. Welcome to CodeOrbit! When you're ready for a next one, the help wanted issues are open to you. #14 (keeping focus inside dialogs) would be a good step up.
abhishekgoswami0720
merged commit Nov 11, 2026
dfe5e3b
into
LetsCook-Organization:main
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌌 Pull Request Summary
Description
Goal and project deadline countdowns could be one day off depending on the viewer’s timezone and time of day. This PR uses local calendar days for consistent countdowns.
The shared
daysUntil(dateStr)helper validates date-only strings and ISO timestamps, returns the whole-day difference from today in the local calendar, and returnsnullfor missing or invalid dates.formatDaysUntil()provides consistent countdown wording.Home’s Dashboard, Goals, and Projects now use these helpers. Finished goals retain their “Finished • was due” label, and finished projects with past target dates now show the same kind of label instead of an active “days late” countdown.
Added date tests cover today, tomorrow, yesterday, multiple days overdue, future dates, missing and malformed dates, month-end and year-end, leap days, timezone offsets, and daylight-saving transitions. Added an Unreleased entry to
CHANGELOG.md.Fixes #8
Type of Change
How Has This Been Tested?
Automated checks:
npm run check— passed: ESLint, Prettier, and 101/101 tests in Asia/Kolkata, UTC, America/Los_Angeles, and Pacific/Kiritimati.Contributor Checklist
docs/FLOW.md.escapeHTML(), and links throughsafeUrl(), to prevent XSS.APP_FILESandCACHE_VERSIONare unchanged (not applicable: no app files were added, removed, or renamed).docs/FLOW.mddoes not yet describe the new helper call paths.npm run checkpasses locally.CHANGELOG.md.docs/DECISIONS.md. Not applicable: no new library, data shape, or architectural trade-off was introduced.docs/FLOW.md. Pending: the new calls from the page renderers to the shared date helpers are not documented there.