Skip to content

Commit

Permalink
Package duration: fix bug format Days return Hours and not Days
Browse files Browse the repository at this point in the history
  • Loading branch information
nabbar committed Nov 29, 2023
1 parent 82be8c0 commit 9851a8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duration/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (d Duration) String() string {
}

func (d Duration) Days() int64 {
t := math.Floor(d.Time().Hours())
t := math.Ceil(d.Time().Hours() / 24)

if t > math.MaxInt64 {
return math.MaxInt64
Expand Down

0 comments on commit 9851a8c

Please sign in to comment.