def Date.valid

bend-kit-time@0.3.0.0 · time.bend:198

import bend-kit-time@0.3.0.0/time.bend as Time
import 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))))

Uses (6)

Used by (1)