[Bug]: Upcoming "End of the current month" shows part of next month. #1856

Closed
opened 2026-02-28 19:56:26 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @Acc3ss1337 on GitHub (Feb 12, 2025).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

When selecting the new option "End of the current month" in the "Change upcoming length" setting under Schedules, only schedules up to and including the last day of the current month should be displayed.

For example, as of now (February), the expected behavior is that schedules should only be shown up to February 28. However, schedules for March 1 are still being displayed.

Environment:

Actual Budget Version: 25.2.1

How can we reproduce the issue?

  • Go to Schedules.
  • Enter schedules for February 28 und March 1
  • Change the "Change upcoming length" setting to "End of the current month".
  • Observe the displayed schedules.

Expected behavior:
Only schedules up to the last day of the current month should be shown (e.g., February 28).

Actual behavior:
Schedules for the 1st of the next month (March 1) are still shown.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox

Operating System

Windows 11

Originally created by @Acc3ss1337 on GitHub (Feb 12, 2025). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? When selecting the new option "End of the current month" in the "Change upcoming length" setting under Schedules, only schedules up to and including the last day of the current month should be displayed. For example, as of now (February), the expected behavior is that schedules should only be shown up to February 28. However, schedules for March 1 are still being displayed. Environment: Actual Budget Version: 25.2.1 ### How can we reproduce the issue? - Go to Schedules. - Enter schedules for February 28 und March 1 - Change the "Change upcoming length" setting to "End of the current month". - Observe the displayed schedules. Expected behavior: Only schedules up to the last day of the current month should be shown (e.g., February 28). Actual behavior: Schedules for the 1st of the next month (March 1) are still shown. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox ### Operating System Windows 11
GiteaMirror added the bugschedules labels 2026-02-28 19:56:26 -06:00
Author
Owner

@Acc3ss1337 commented on GitHub (Mar 14, 2025):

I think I tracked down the issue. There's a small arithmetic mistake in packages/loot-core/src/shared/schedules.ts - specifically at

line 396:
return end - day + 1;

In my eyes the "+ 1" causes the wrong scheduling calculation for "currentMonth". Fixing that line to match the intended math should lead to the desired behaviour.

@Acc3ss1337 commented on GitHub (Mar 14, 2025): I think I tracked down the issue. There's a small arithmetic mistake in packages/loot-core/src/shared/schedules.ts - specifically at line 396: `return end - day + 1;` In my eyes the "+ 1" causes the wrong scheduling calculation for "currentMonth". Fixing that line to match the intended math should lead to the desired behaviour.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1856