MCPcopy Create free account
hub / github.com/AudDMusic/RedditBot / SecondsToTimeString

Function SecondsToTimeString

main.go:123–128  ·  view source on GitHub ↗
(i int, includeHours bool)

Source from the content-addressed store, hash-verified

121}
122
123func SecondsToTimeString(i int, includeHours bool) string {
124 if includeHours {
125 return fmt.Sprintf("%02d:%02d:%02d", i/3600, (i%3600)/60, i%60)
126 }
127 return fmt.Sprintf("%02d:%02d", i/60, i%60)
128}
129
130func GetTimeFromText(s string) (int, int) {
131 s = strings.ReplaceAll(s, " - ", "")

Callers 1

HandleQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected