def IsoWeek.from.eq
import bend-time-lib@0.4.0.1/week.bend as Weekimport Base
import bend-time-lib@0.4.0.1/date.bend as D
65def IsoWeek.from.eq(
66 +year: U32, +week: U32, +got: D.Date,
67 r: Result<&2, &2, D.Date.Error, IsoWeek>
68) -> Result<&2, &2, D.Date.Error, D.Date>:
69 match r:
70 case Fail{e}:
71 Fail{e}
72 case Done{IsoWeek{+y2, +w2}}:
73 IsoWeek.from.ok(
74 got, Bool.and(U32.is_eq(y2, year), U32.is_eq(w2, week))
75 )