mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-12-20 10:21:22 +00:00
Fix: Use proper rounding
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b8090d9a52
commit
d83ac3e502
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ func (m modPresence) cronUpdatePresence() {
|
||||||
func (m modPresence) durationToHumanReadable(d time.Duration) string {
|
func (m modPresence) durationToHumanReadable(d time.Duration) string {
|
||||||
d = time.Duration(math.Abs(float64(d)))
|
d = time.Duration(math.Abs(float64(d)))
|
||||||
if d > time.Hour*24 {
|
if d > time.Hour*24 {
|
||||||
return fmt.Sprintf("%.0f Tagen", math.Ceil(float64(d)/float64(time.Hour*24)))
|
return fmt.Sprintf("%.0f Tagen", math.Round(float64(d)/float64(time.Hour*24)))
|
||||||
}
|
}
|
||||||
|
|
||||||
var elements []string
|
var elements []string
|
||||||
|
|
Loading…
Reference in a new issue