Module

BetaCalendars.GridAlgebra.Validation

Package
purescript-betacalendars-grid-algebra
Repository
mateopedersen/purescript-betacalendars-grid-algebra

Reusable structural checks for grids, dates, layouts, and whole years.

These checks are ordinary pure values, so applications may run them at ingestion boundaries or tests without introducing effects.

#validateMonthGrid Source

validateMonthGrid :: MonthGrid -> Array ValidationIssue

Check row-major size, the first-day offset, natural row bounds, and date completeness for a constructed month grid.

#validateFixedGrid Source

validateFixedGrid :: MonthGrid -> Array ValidationIssue

Check that a grid explicitly selected as fixed six weeks has 42 cells.

#validateDateCompleteness Source

validateDateCompleteness :: MonthGrid -> Array ValidationIssue

Confirm that days 1 through the month's final day occur exactly once and in order as current-month cells.

#validateLayout Source

validateLayout :: LayoutSpec -> Array ValidationIssue

Validate a printable layout and report the specific geometry error.

#validateYear Source

validateYear :: Year -> Array ValidationIssue

Exhaustively validate both grid modes and all seven week origins for a year. This is deterministic finite checking, not a proof over all years.