Clean up task editor and time editor

This commit is contained in:
Martin Pander
2026-02-17 20:57:21 +01:00
parent 6e60698526
commit 1a9fd9b4b0
10 changed files with 141 additions and 115 deletions

View File

@@ -178,7 +178,7 @@ func (t *Task) GetString(fieldWFormat string) string {
return t.Recur
default:
slog.Error(fmt.Sprintf("Field not implemented: %s", field))
slog.Error("Field not implemented", "field", field)
return ""
}
}
@@ -214,7 +214,7 @@ func formatDate(date string, format string) string {
dtformat := "20060102T150405Z"
dt, err := time.Parse(dtformat, date)
if err != nil {
slog.Error("Failed to parse time:", err)
slog.Error("Failed to parse time", "error", err)
return ""
}
@@ -238,7 +238,7 @@ func formatDate(date string, format string) string {
case "countdown":
return parseCountdown(time.Since(dt))
default:
slog.Error(fmt.Sprintf("Date format not implemented: %s", format))
slog.Error("Date format not implemented", "format", format)
return ""
}
}