diff --git a/src/app/pc_string.go b/src/app/pc_string.go index 03a8340..da6e97c 100644 --- a/src/app/pc_string.go +++ b/src/app/pc_string.go @@ -51,11 +51,11 @@ func HumanDuration(d time.Duration) string { } else if hours < 24*365*2 { return fmt.Sprintf("%dd", hours/24) } else if hours < 24*365*8 { - dy := int(hours/24) % 365 + dy := hours / 24 % 365 if dy == 0 { return fmt.Sprintf("%dy", hours/24/365) } return fmt.Sprintf("%dy%dd", hours/24/365, dy) } - return fmt.Sprintf("%dy", int(hours/24/365)) + return fmt.Sprintf("%dy", hours/24/365) }