def clock.text
import cswap-bend-cli@0.1.0.0/usage/norm.bend as Normimport Base
import cswap-bend-cli@0.1.0.0/clock.bend as Clock
22# "20:39" on the same local day as now, else "Jul 5 08:59". `off` is the local
23# UTC offset biased by 86400 (Clock.tz).
24def clock.text(+reset: U32, +now: U32, +off: U32) -> String:
25 Clock.sel.s(U32.is_eq(((reset + off - 86400) / 86400 : U32), ((now + off - 86400) / 86400 : U32)),
26 hhmm((reset + off - 86400 : U32)),
27 clock.date(Clock.civil(((reset + off - 86400) / 86400 : U32)), (reset + off - 86400 : U32)))