add missing case in entry and fix unit formatting; ref #13
This commit is contained in:
parent
ba824325bc
commit
dcd613622e
2 changed files with 6 additions and 6 deletions
|
@ -107,13 +107,13 @@ func (entry *Entry) GetOutputForTrack(isRunning bool, wasRunning bool) (string)
|
|||
|
||||
now := time.Now()
|
||||
trackDiffNow := now.Sub(entry.Begin)
|
||||
trackDiffNowOut := time.Time{}.Add(trackDiffNow)
|
||||
durationString := fmtDuration(trackDiffNow)
|
||||
|
||||
if isRunning == true && wasRunning == false {
|
||||
outputPrefix = "began tracking"
|
||||
} else if isRunning == true && wasRunning == true {
|
||||
outputPrefix = "tracking"
|
||||
outputSuffix = fmt.Sprintf(" for %sh", color.FgLightWhite.Render(trackDiffNowOut.Format("15:04")))
|
||||
outputSuffix = fmt.Sprintf(" for %sh", color.FgLightWhite.Render(durationString))
|
||||
} else if isRunning == false && wasRunning == false {
|
||||
outputPrefix = "tracked"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue