Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Program crashes if the day of the month is the 31st #6

Closed
margual56 opened this issue Sep 27, 2023 · 1 comment · Fixed by #13
Closed

[BUG] - Program crashes if the day of the month is the 31st #6

margual56 opened this issue Sep 27, 2023 · 1 comment · Fixed by #13
Assignees
Labels
Backend Affects the Backend in Rust bug Something isn't working

Comments

@margual56
Copy link
Owner

Bug description

When setting the recurrence day of a subscription or income to be the 31st of a month, it crashes.

To Reproduce

  1. Create a new monthly subscription
  2. Set the recurrence day to 31
  3. Save
  4. The program crashes

Expected behavior

It should not crash. The 31st should be interpreted as "the last day of the month".

Screenshots

N/A

Information

  • OS: N/A
  • Program version: 0.1.2

Additional context
A dropdown could also be added with the options "first day of the month", "last day of the month", etc.

Originally reported by @inoricat

@margual56 margual56 added bug Something isn't working Backend Affects the Backend in Rust labels Sep 27, 2023
@margual56 margual56 self-assigned this Sep 27, 2023
@margual56 margual56 moved this to 🏗 In progress in NixBucks Sep 27, 2023
margual56 added a commit that referenced this issue Sep 27, 2023
@margual56 margual56 moved this from 🏗 In progress to 👀 In review in NixBucks Sep 27, 2023
@margual56
Copy link
Owner Author

image

The program assumes that "day 31" means whatever the last day of the month is for each month. Day 30 is just a recurrence on day 30 (or day 28 in February).

Waiting for feedback on this change.

@margual56 margual56 linked a pull request Sep 27, 2023 that will close this issue
margual56 added a commit that referenced this issue Sep 27, 2023
* fix: Miscalculation on yearly costs

* fix: Typo on recurrences

* fix: bug #10; temporary fix for bug #11

* Fix: bug #6, solution is untested

* Run cargo fmt

* Fix: issue #7

* Bump version
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in NixBucks Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Affects the Backend in Rust bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant