def Date.valid
import bend-kit-time@0.3.0.0/time.bend as Timeimport Base
198def Date.valid(d: Date) -> Bool:
199 match d:
200 case Date{+y, +m, +dd}:
201 Bool.and(U32.is_le(y, 9999),
202 Bool.and(U32.is_ge(dd, 1), U32.is_le(dd, Date.days_in_month(y, m))))