Add rounding direction
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user