def Date.from.dim
import bend-time-lib@0.4.0.1/date.bend as Dateimport Base
101def Date.from.dim(
102 +y: U32, +m: U32, +d: U32, dim: Maybe<&2, U32>
103) -> Result<&2, &2, Date.Error, Date>:
104 match dim:
105 case None{}:
106 Fail{InvalidDate{y, m, d}}
107 case Some{n}:
108 Date.from.day(y, m, d, n)