|
|
|
@ -254,15 +254,12 @@ func scanMixedDelay(str string) (bool, time.Time, error) {
|
|
|
|
|
default:
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
/* TO FIX
|
|
|
|
|
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) {
|
|
|
|
|