uncap prediction months because wheeee

main
Bel LaPointe 2023-10-26 07:08:39 -06:00
parent dfde4c63fe
commit ffc574bc94
1 changed files with 1 additions and 6 deletions

View File

@ -81,18 +81,13 @@ func main() {
bpis := maps.Clone(bpis)
// MODIFIERS
if predictionMonths, err := strconv.ParseInt(r.URL.Query().Get("predictionMonths"), 10, 8); err == nil && predictionMonths > 0 {
if predictionMonths, err := strconv.ParseInt(r.URL.Query().Get("predictionMonths"), 10, 16); err == nil && predictionMonths > 0 {
predictionDuration := time.Hour * 24 * 365 / 12 * time.Duration(predictionMonths)
if r.URL.Query().Get("predictContributions") != "" {
register, err = ledger.RegisterWithContributionPrediction(register, predictionDuration)
if err != nil {
panic(err)
}
for _, name := range register.Names() {
for _, d := range register.Dates() {
log.Printf("%s | %s | %+v", name, d, register[d][name])
}
}
}
for _, nameRate := range r.URL.Query()["predictCompoundingInterest"] {
name := strings.Split(nameRate, "=")[0]