mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
duration formatting update
This commit is contained in:
@@ -28,7 +28,7 @@ func FormatDuration(d time.Duration) string {
|
||||
if minutes > 0 {
|
||||
parts = append(parts, fmt.Sprintf("%d minute%s", minutes, pluralize(minutes)))
|
||||
}
|
||||
if seconds > 0 {
|
||||
if seconds > 0 && totalSeconds < 3600 {
|
||||
parts = append(parts, fmt.Sprintf("%d second%s", seconds, pluralize(seconds)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user