Add rounding direction

This commit is contained in:
2022-10-04 12:37:11 -05:00
parent b0f5e928d9
commit a8c1812bbf
5 changed files with 41 additions and 6 deletions

View File

@@ -53,7 +53,7 @@ func opI3Status(cmd *cobra.Command, args []string) error {
}
var text string
if wrk.FinishDate.IsZero() {
wrkDur := wrk.Duration().Round(time.Minute * 15)
wrkDur := util.Round(wrk.Duration())
hrs := int(wrkDur.Hours())
mins := int(wrkDur.Minutes()) - hrs*60
if hrs > 0 {
@@ -99,7 +99,7 @@ func opI3Status(cmd *cobra.Command, args []string) error {
}
total += dur
}
total = total.Round(util.GetRoundToDuration())
total = util.Round(total)
if isActive {
return fmt.Sprintf("%.2f+", util.DurationToDecimal(total))
} else {