def Period.add_to.day
import bend-time-lib@0.4.0.1/period.bend as Periodimport Base
import bend-time-lib@0.4.0.1/date.bend as D
42def Period.add_to.day(
43 +y: U32, +m: U32, +d: U32, +pd: U32, +dim: U32, le: Bool
44) -> Result<&2, &2, D.Date.Error, D.Date>:
45 match le:
46 case True{}:
47 Period.add_to.from(y, m, d, pd)
48 case False{}:
49 Period.add_to.from(y, m, dim, pd)