def TimeOfDay.from
import bend-time-lib@0.4.0.1/datetime.bend as Datetimeimport Base
40def TimeOfDay.from(
41 +h: U32, +mi: U32, +s: U32, frac: TimeFrac
42) -> Result<&2, &2, TimeOfDay.Error, TimeOfDay>:
43 TimeOfDay.from.frac(
44 h, mi, s, frac,
45 Bool.and(
46 U32.is_le(h, 23),
47 Bool.and(U32.is_le(mi, 59), U32.is_le(s, 59))
48 )
49 )