def Duration.to_hms.ok

bend-time-lib@0.4.0.1 · duration.bend:292

import bend-time-lib@0.4.0.1/duration.bend as Duration
import Base

292def Duration.to_hms.ok(+days: U32, +sod: U32) -> Bool:
293  +cap = U32.div(U32.not(0), 24)
294  Bool.or(
295    U32.is_lt(days, cap),
296    Bool.and(
297      U32.is_eq(days, cap),
298      U32.is_le(U32.div(sod, 3600), U32.mod(U32.not(0), 24))
299    )
300  )

Uses (10)

Used by (1)