def Period.add_to.y3

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

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

60def Period.add_to.y3(
61  +y: U32, +m: U32, +d: U32, +pd: U32, ok: Bool
62) -> Result<&2, &2, D.Date.Error, D.Date>:
63  match ok:
64    case False{}:
65      Fail{D.OutOfRange{}}
66    case True{}:
67      Period.add_to.dim(y, m, d, pd, D.Date.dim(m, D.Date.leap(y)))

Uses (8)

Used by (1)