Add mixed durations in reminder
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is failing Details

master v1.0.3
Hamcha 2022-03-27 23:17:28 +02:00
parent 0279e6bd35
commit 3f1f822b8c
Signed by: Hamcha
GPG Key ID: 1669C533B8CF6D89
1 changed files with 3 additions and 6 deletions

View File

@ -254,15 +254,12 @@ func scanMixedDelay(str string) (bool, time.Time, error) {
return true, now, fmt.Errorf("La durata ha una unità che non conosco, usa una di queste: s (secondi) m (minuti) h (ore) d (giorni)")
return true, now.Add(dur), nil
now = now.Add(dur)
remaining = remaining[scanned:]
nextIndex := strings.IndexRune(remaining, sep)
remaining = remaining[nextIndex+1:]
fmt.Printf("tot: %s", now.Sub(time.Now()))
return true, now, nil
return false, now, nil
func parseDuration(date string, loc *time.Location) (time.Time, error) {