Fix Streak Calculation to Use Effective Today Date - #8759
Conversation
…Date in streak calculation
|
This pull request addresses an important bug fix by ensuring that the streak calculation respects user timezone settings. It is similar to previous decisions made regarding the use of |
📦 Next.js Bundle Size Report (Gzipped Sizes)✨ No significant bundle size changes detected. 📊 Summary of Totals
|
Aamod007
left a comment
There was a problem hiding this comment.
Nice fix! Replacing \localTodayStr\ with \effectiveTodayStr\ in the \ odayIndex\ calculation of \lib/calculate.ts\ properly aligns the streak calculation with the user's timezone settings rather than defaulting to the server's or viewer's local time. This is a crucial fix for accuracy. Good job!
Description
Fixed
calculateStreakinlib/calculate.tsto useeffectiveTodayStrfortodayIndexcalculation instead oflocalTodayStr. This ensures streak calculation respects user timezone settings.Pillar
Checklist
CONTRIBUTING.mdfile.Note
Please assign this PR to the
tmdeveloper007account.Closes #8757