def Period.from

bend-time-lib@0.4.0.1 · period.bend:19

import bend-time-lib@0.4.0.1/period.bend as Period
import Base

19def Period.from(
20  +years: U32, +months: U32, +days: U32
21) -> Result<&2, &2, Period.Error, Period>:
22  +extra = U32.div(months, 12)
23  Period.from.y(
24    years, extra, U32.mod(months, 12), days,
25    U32.is_le(extra, U32.sub(U32.not(0), years))
26  )

Uses (10)

Used by (3)