support combo new and old

This commit is contained in:
bel
2021-07-17 22:51:54 -06:00
parent d5ec073f75
commit 9301ddd467
2 changed files with 2 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ func ToDuration(s string) time.Duration {
for len(substr) > 0 && (substr[len(substr)-1] >= '0' && substr[len(substr)-1] <= '9') {
substr = substr[:len(substr)-1]
}
s = strings.ReplaceAll(s, substr, "")
substr = strings.TrimSuffix(substr, c.key)
n, _ := strconv.Atoi(substr)
d += c.d * time.Duration(n)