Period shapes
@teakit/matrix builds in four fixed-shape period matrices, each with a fixed
row length and a fixed key format.
API Reference
DayMatrix uses YYYY-MM -> 31 (one month per row), not YYYY -> 366.
Non-existent days (e.g. Feb 30) are "-".
Shape detection
rollup and rolldown take no from argument — they detect the input period
from key format + row length:
YYYY -> 1→ yearYYYY -> 4→ quarterYYYY -> 12→ monthYYYY-MM -> 31→ day
All rows must match one shape. Mixed or unrecognized shapes raise
MATRIX_UNRECOGNIZED_PERIOD_MATRIX. An ordinary matrix that happens to match a
shape is treated as that period — this is intentional.