This commit is contained in:
Bel LaPointe
2023-10-25 19:19:07 -06:00
parent f49308d4d5
commit 76aa4ff34a
4 changed files with 129 additions and 59 deletions

View File

@@ -1,28 +0,0 @@
package ledger
import (
"fmt"
"io"
"time"
)
func RegisterWithContributionPrediction(reg map[string]Balances, windowAsPercentOfTotalDuration float64) (map[string]Balances, error) {
return reg, io.EOF
}
func RegisterWithCompoundingInterestPrediction(reg map[string]Balances, windowAsPercentOfTotalDuration float64, name string, rate float64) (map[string]Balances, error) {
result := make(map[string]Balances)
return result, io.EOF
}
func dateToTime(s string) (time.Time, error) {
for _, layout := range []string{
"2006-01-02",
"2006-01",
} {
if t, err := time.ParseInLocation(layout, s, time.Local); err == nil {
return t, err
}
}
return time.Time{}, fmt.Errorf("no layout matching %q", s)
}