def secs_of

cswap-bend-cli@0.1.0.0 · tui/num.bend:69

import cswap-bend-cli@0.1.0.0/tui/num.bend as Num
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json

69# Whole seconds of a JSON number: "1792740000.1" -> 1792740000.
70def secs_of(+j: Json.Json) -> Maybe<&2, U32>:
71  match j:
72    case Json.JNum{t}:
73      secs_parts(String.split(t, '.'))
74    case _:
75      None{}

Uses (6)

Used by (1)