def Period.add_to.dim

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

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

51def Period.add_to.dim(
52  +y: U32, +m: U32, +d: U32, +pd: U32, dimr: Maybe<&2, U32>
53) -> Result<&2, &2, D.Date.Error, D.Date>:
54  match dimr:
55    case None{}:
56      Fail{D.OutOfRange{}}
57    case Some{+dim}:
58      Period.add_to.day(y, m, d, pd, dim, U32.is_le(d, dim))

Uses (7)

Used by (1)