MCPcopy Create free account
hub / github.com/efogdev/mpris-timer / NumToLabelText

Function NumToLabelText

internal/core/time.go:64–71  ·  view source on GitHub ↗
(num int)

Source from the content-addressed store, hash-verified

62}
63
64func NumToLabelText(num int) string {
65 if num > 59 || num < 0 {
66 log.Printf("NumToLabelText: num must be between 0 and 59")
67 return "00"
68 }
69
70 return fmt.Sprintf("%02d", num)
71}
72
73// FormatDuration converts a time.Duration to a string in the format "HH:MM:SS" or "MM:SS".
74// Hours are only included if the duration is 1 hour or longer.

Callers 2

setupTimeEntryFunction · 0.92
NewSidebarFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected