Skip to content

fix: prevent today's notes from showing as yesterday#65

Merged
VinayKumar42 merged 2 commits intoHarshYadav152:mainfrom
KARTIK001-CODER:main
Jan 6, 2026
Merged

fix: prevent today's notes from showing as yesterday#65
VinayKumar42 merged 2 commits intoHarshYadav152:mainfrom
KARTIK001-CODER:main

Conversation

@KARTIK001-CODER
Copy link
Contributor

@KARTIK001-CODER KARTIK001-CODER commented Jan 5, 2026

Here’s your PR content filled in and ready to paste.


Description

Fixes incorrect relative date calculation where notes created today were displayed as “Yesterday” due to timezone shifts and use of Math.ceil().

The logic now compares local calendar days instead of raw millisecond differences.

Fixes #61


Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Created notes using new Date().toISOString() at different times of day.
  2. Verified that notes created today always display as “Today”.
  3. Tested behavior across different system timezones.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@vercel
Copy link

vercel bot commented Jan 5, 2026

@KARTIK001-CODER is attempting to deploy a commit to the Harsh Yadav's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Thank you @KARTIK001-CODER for your first PR to SaveBook!

We really appreciate your contribution 🙌

What happens next:

  • 🔍 Maintainers will review your PR
  • 🧪 Automated checks will run
  • ✨ Feedback may be shared if needed

Please confirm your PR includes:

  • ✔️ Clear summary of changes
  • ✔️ Linked issue (e.g., Fixes #123)
  • ✔️ Steps to test
  • ✔️ Screenshots (for UI changes)

📘 Contribution Standards:
👉 https://github.com/HarshYadav152/SaveBook/blob/main/CONTRIBUTING.md


💬 Stay Connected with Our Community

🎯 Discord (Official Communication)
For formal discussions, code reviews, and project updates:
👉 https://discord.gg/eMTePUK3gJ

💚 WhatsApp (Friendly Community)
For informal chats, quick help, and building friendships with contributors:
👉 https://chat.whatsapp.com/I8GYXd3mHlDCC2iXhNGeqV

🌟 Our Philosophy: We value both professional collaboration (Discord) and personal connections (WhatsApp). Join both to get the complete SS-Capture community experience!


Thanks for helping improve SaveBook 🚀
Let's build something amazing together! 💪

@VinayKumar42 VinayKumar42 self-requested a review January 6, 2026 08:31
@VinayKumar42 VinayKumar42 added bug Something isn't working easy Good for beginner mostly minute bug fixes. under-ECWoC26 under-ECWoC26 issue or PR for program tracking and evaluation. labels Jan 6, 2026
@VinayKumar42 VinayKumar42 added ECWoC26 and removed bug Something isn't working easy Good for beginner mostly minute bug fixes. under-ECWoC26 under-ECWoC26 issue or PR for program tracking and evaluation. labels Jan 6, 2026
@VinayKumar42 VinayKumar42 merged commit 1946f92 into HarshYadav152:main Jan 6, 2026
1 check failed
JiyaBatra pushed a commit to JiyaBatra/SaveBook that referenced this pull request Jan 27, 2026
fix: prevent today's notes from showing as yesterday
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notes added today display as "Yesterday"

2 participants