diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 09:26:17 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-19 09:26:17 +0200 |
| commit | d71504ad9fc39b735689da32fa0be8a63c2cc7f8 (patch) | |
| tree | 12c4f51d6808e04b2305ee8ed3f455eb9ee245c6 /templates/ef | |
| parent | decb13fb17697f6d6d952c407f2173a714164804 (diff) | |
| download | colitur-d71504ad9fc39b735689da32fa0be8a63c2cc7f8.tar.gz colitur-d71504ad9fc39b735689da32fa0be8a63c2cc7f8.zip | |
fix(render): omit DTEND at the domain's own last day, 9999-12-31
F1: Date.add_days is UNBOUNDED (date.mli) -- only Date.make enforces
1583..9999 -- and Date.to_iso8601 pads but never truncates, so
9999-12-31's naive successor formatted as "10000-01-01", and compact
turned that into a 9-digit, non-conformant DATE on the last VEVENT of
year 9999. Confirmed at the source before fixing, and reproduced
against real `colitur emit --format ics --from 9999 --to 9999` output
(DTEND;VALUE=DATE:100000101) before touching any code.
RFC 5545 section 3.6.1: a VEVENT with a DATE-valued DTSTART and
neither DTEND nor DURATION has an implicit one-day duration, so
omitting DTEND for that one event is the standard's own correct
answer, not a workaround. dtend_of re-derives the successor's
year/month/day and re-validates them through Date.make -- the one
function that actually enforces the domain -- before trusting the
string; None means the caller omits the DTEND line entirely.
F2 (minor, same function): documented next_day's own Error branch as
dead-but-silent on shipped data (event's iso <> "" guard is the only
caller and always parses) -- behaviour unchanged, comment only.
Two new tests: the domain's last VEVENT (DTSTART 99991231) has no
DTEND line at all; every DTEND anywhere in a 9999 feed is exactly 8
digits (the general form of the bug, catches a regression anywhere
else in the domain too). Existing 2027/2028 DTEND-arithmetic
assertions untouched and still pass.
Mutation-proved: both new tests fail against the pre-fix code
(9-digit DTEND value caught verbatim), pass after.
Diffstat (limited to 'templates/ef')
0 files changed, 0 insertions, 0 deletions
