aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/liturgical_day.ml
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 16:23:57 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-11 16:23:57 +0200
commit0506388da160a15ceddb0cea1a697d737103d5c4 (patch)
tree1a186d3f6a8a8d10b027cde6c49d4d11cf7735d4 /lib/kernel/liturgical_day.ml
parent23892f0a5933851e90fb8b6aef5c3b6f7e24bc1b (diff)
downloadcolitur-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/liturgical_day.ml')
0 files changed, 0 insertions, 0 deletions