Fmt.duration: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/tui/fmt.bend as Fmt Lines 73-77 of cswap-bend-cli@0.1.0.0/tui/fmt.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&start_line=73&end_line=77 import Base # The shortest honest duration: 45s, 12m, 2h 13m, 2h, 3d 4h, 3d. def duration(+s: U32) -> String: sel.s(U32.is_lt(s, 60), U32.show(s) ++ "s", sel.s(U32.is_lt(s, 3600), U32.show((s / 60 : U32)) ++ "m", sel.s(U32.is_lt(s, 86400), hm(s), dh(s)))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&name=dh https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&name=hm https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/tui/fmt.bend&name=sel.s