def age_text
import cswap-bend-cli@0.1.0.0/render.bend as Renderimport Base
import cswap-bend-cli@0.1.0.0/clock.bend as Clock
167def age_text(+secs: U32) -> String:
168 Clock.sel.s(U32.is_lt(secs, 60), "just now", Clock.sel.s(U32.is_lt(secs, 3600), U32.show((secs / 60 : U32)) ++ "m ago",
169 Clock.sel.s(U32.is_lt(secs, 86400), U32.show((secs / 3600 : U32)) ++ "h ago", U32.show((secs / 86400 : U32)) ++ "d ago")))