def Period.add_to.mc

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

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

74def Period.add_to.mc(
75  +y: U32, +m: U32, +d: U32, +pd: U32, ge: Bool
76) -> Result<&2, &2, D.Date.Error, D.Date>:
77  match ge:
78    case False{}:
79      Period.add_to.y2(y, m, d, pd)
80    case True{}:
81      Period.add_to.y2(U32.add(y, 1), U32.sub(m, 12), d, pd)

Uses (8)

Used by (1)