Skip to content

Conversation

@abiteman
Copy link
Contributor

Fixed issue #25 where recurring transactions set for the end of a month (like the 31st) weren't correctly calculating the appropriate date in shorter months.

Changes:

  • Improved the monthly recurring transaction logic to always use the last day of the month when the original transaction was on the last day of its month
  • Fixed date rollover issues that caused transactions to appear on incorrect dates (e.g., Jan 31 -> Mar 3 instead of Feb 28/29)
  • Added special handling for months with fewer days by using a safe approach that avoids JavaScript's automatic date adjustments
  • Fixed edge cases for all months regardless of their length (30/31 days)

The solution now correctly handles all cases:

  • Jan 31 -> Feb 28/29 -> Mar 31 -> Apr 30 -> May 31
  • Apr 30 -> May 31 -> Jun 30
  • And preserves the "last day of month" intent when appropriate

Fixed issue #25 where recurring transactions set for the end of a month
(like the 31st) weren't correctly calculating the appropriate date in
shorter months.

Changes:
- Improved the monthly recurring transaction logic to always use the
  last day of the month when the original transaction was on the
  last day of its month
- Fixed date rollover issues that caused transactions to appear on
  incorrect dates (e.g., Jan 31 -> Mar 3 instead of Feb 28/29)
- Added special handling for months with fewer days by using a
  safe approach that avoids JavaScript's automatic date adjustments
- Fixed edge cases for all months regardless of their length (30/31 days)

The solution now correctly handles all cases:
- Jan 31 -> Feb 28/29 -> Mar 31 -> Apr 30 -> May 31
- Apr 30 -> May 31 -> Jun 30
- And preserves the "last day of month" intent when appropriate
@abiteman abiteman self-assigned this Mar 23, 2025
@abiteman abiteman merged commit 394a22b into main Mar 23, 2025
1 check failed
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