Conversation
imonroe
approved these changes
Mar 31, 2026
| const [interestAmount, setInterestAmount] = useState(0); | ||
| const [totalAmount, setTotalAmount] = useState(0); | ||
| const MAX_YEARS = 240; | ||
| const MAX_PERIODS = 960; // 240 years * 4 quarters (reasonable max) |
Collaborator
There was a problem hiding this comment.
The comment says "240 years × 4 quarters (reasonable max)" — but now that daily and weekly compounding are available, 960 is a very tight ceiling. 960 days is only about 2.6 years. A user selecting Daily and wanting to model 10 years would need to enter 3,650 but can't. The max was designed around quarterly as the most granular option; it needs rethinking now that daily is supported.
Collaborator
Author
There was a problem hiding this comment.
Ok. Thank you for pointing that out. I'll bring it up in our meeting today.
Collaborator
Author
|
@imonroe Can you take a look at this again? The MAX_PERIODS was added by the AI and it was not client requested. I pulled out the MAX_PERIODS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
READY FOR REVIEW
Summary
Review By (Date)
Criticality
Review Tasks
Setup tasks and/or behavior to test
Initial amount: $1,000
Interest rate: 8%
Number of compounding periods: 20
Compounding semi-annually
Final amount: $2,191.12
Currently, if I put the same inputs into the calculator, the final amount is: $4,801.02, which is the output for 20 years (40 semi-annual periods).
Front End Validation
Backend / Functional Validation
Code
Code security
General
Affected Projects or Products
Associated Issues and/or People
@mentionthem here)Resources