Skip to content

fix(dashboard): keep the days even on a period's last day - #478

Closed
saesch83 wants to merge 1 commit into
otherworld-dev:devfrom
saesch83:fix/comparable-range-last-day
Closed

saesch83 wants to merge 1 commit into
otherworld-dev:devfrom
saesch83:fix/comparable-range-last-day

Conversation

@saesch83

@saesch83 saesch83 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Small follow-up to #458.

On the last day of a budget period the dashboard's hero tiles compared the period with the whole previous one, because a period counted as over from its last day on (today >= current.end). On 28 February that put 28 days of February against all 31 days of January.

Now the comparison stays day-for-day through the last day (today > current.end ends it), and the whole previous period is used only once the current one is over.

  • src/utils/formatters.js: one condition plus the docblock
  • tests/js/reportMonthGrouping.test.js: last day of the period, and the day after it
  • js/budget-app.js rebuilt

🤖 Generated with Claude Code

On the last day of a budget period the hero tiles compared it with the
whole previous period, so on 28 February 28 days met all 31 of January.
Only once the period is over does the whole previous one count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
otherworld-dev added a commit that referenced this pull request Nov 7, 2026
@otherworld-dev

Copy link
Copy Markdown
Owner

Merged on dev as 9c4758e, with the bundle rebuilt, so I'm closing this here. It'll be in the next release.

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.

2 participants