def Date.previous_or_same_weekday
import bend-time-lib@0.4.0.1/date.bend as Dateimport Base
464def Date.previous_or_same_weekday(
465 +d: Date, +w: Weekday
466) -> Result<&2, &2, Date.Error, Date>:
467 Date.previous_or_same.go(
468 d, w, U32.is_eq(Weekday.to_u32(Date.weekday(d)), Weekday.to_u32(w))
469 )