Skip to content

Commit

Permalink
improve format
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkuhn committed Oct 29, 2024
1 parent 09b794b commit e20741f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/tracker/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,21 +251,21 @@ func (t *Tracker) Report(ctx context.Context, w io.Writer) error {
spentBusy = spentBusy.Round(time.Minute)
spentTotal = spentTotal.Round(time.Minute)
// todo: raise warning if totalBusy is > 10h (or busyPlus > 10:45), since more than 10h are not allowed
_, _ = fmt.Fprintf(w, "total: %v busy: %v busy+break: %v skipped(<%v): %d belowMax(%v): %v\n",
_, _ = fmt.Fprintf(w, "total: %v busy: %v busy+break: %v skipped(<%v): %d overMax(%v): %v\n",
//first.BusyStart.Format("2006-01-02 Mon"),
spentTotal,
spentBusy,
(spentBusy + kitKat).Round(time.Minute),
t.opts.MinBusy, skippedTooShort,
t.opts.MaxBusy, spentBusy <= t.opts.MaxBusy,
t.opts.MaxBusy, spentBusy > t.opts.MaxBusy,
)
sugStart, _ := time.Parse("15:04", "09:00")
_, _ = fmt.Fprintf(w, "Simple Entry for %s: %v → %v (inc. %.0fm break) overtime: %v\n",
_, _ = fmt.Fprintf(w, "Simple Entry for %s: %v → %v (inc. %.0fm break) overtime (>%v): %v\n",
first.BusyStart.Format("Monday"),
sugStart.Format("15:04"),
sugStart.Add((spentBusy + kitKat).Round(time.Minute)).Format("15:04"),
kitKat.Round(time.Minute).Minutes(),
spentBusy-t.opts.RegBusy,
t.opts.RegBusy, spentBusy-t.opts.RegBusy,
)
_, _ = fmt.Fprintln(w, strings.Repeat("=", 100))
_, _ = fmt.Fprintln(w, "")
Expand Down

0 comments on commit e20741f

Please sign in to comment.