refactor: ui refactor step 2

This commit is contained in:
Patryk Hegenberg 2025-06-27 19:55:34 +02:00
parent 9cae00d2a5
commit 24430d0fae
9 changed files with 167 additions and 121 deletions

View file

@ -0,0 +1,13 @@
package utils
import "fmt"
// FormatDuration wandelt Sekunden in einen MM:SS String um.
func FormatDuration(totalSeconds int64) string {
if totalSeconds < 0 {
totalSeconds = 0
}
mins := totalSeconds / 60
secs := totalSeconds % 60
return fmt.Sprintf("%02d:%02d", mins, secs)
}