uncap prediction months because wheeee
parent
dfde4c63fe
commit
ffc574bc94
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue