diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-11 16:23:57 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-11 16:23:57 +0200 |
| commit | 0506388da160a15ceddb0cea1a697d737103d5c4 (patch) | |
| tree | 1a186d3f6a8a8d10b027cde6c49d4d11cf7735d4 /lib/kernel/layer.ml | |
| parent | 23892f0a5933851e90fb8b6aef5c3b6f7e24bc1b (diff) | |
| download | colitur-0506388da160a15ceddb0cea1a697d737103d5c4.tar.gz colitur-0506388da160a15ceddb0cea1a697d737103d5c4.zip | |
cli: emit "-" for an absent week, keeping output column-safe
week is "" for roughly 30 days a year (any day outside a numbered
week). Printed as-is among seven space-separated fields, that collapses
two fields into a double space, so naive field-position parsing (e.g.
awk '{print $4}') silently reads the wrong column on those days -- a
real defect for a project whose stated design is Unix-composable CLIs.
Emit "-" instead, so every line always has exactly seven
single-space-separated fields.
Record.headers/to_row exist for exactly this kind of column-safe
encoding but use a different column set and order than this CLI's
documented date/weekday/season/week/slug/rank/colour format (design
spec ยง6); adopting them here would be a larger, unrequested format
change, so this keeps the CLI's own field list and only substitutes
the empty value.
The cram test's pinned lines are re-verified against liturgical
anchors before promoting, not blind-promoted: 1 Jan 2026 (Circumcision,
class-1, white) and 2-3 Jan (ordinary class-4 Christmastide ferias,
the finding-1 slug fix already re-pinned separately) are correct;
2026-04-05 remains the sole Easter Sunday line, Paschaltide week 1,
class-1, white, matching the independently-computed Easter anchors
printed by `colitur easter 2026` immediately above in the same file.
Diffstat (limited to 'lib/kernel/layer.ml')
0 files changed, 0 insertions, 0 deletions
