Pin a multi-year calendar
Intention
Section titled “Intention”I want to use one unchanging calendar set over the whole declared period.
Incorrect form and why it stays silent
Section titled “Incorrect form and why it stays silent”The node period and the set digest are different obligations. An old file cannot be extended under the former hash. The timezone-database pin must be a string:
timezone_db 42;Omitting timezone_db is currently accepted by check; that is not proof that the set is fit for execution.
Correct form
Section titled “Correct form”language "law.core" version "0.2";package recipes.e.r09 version "0.1.0";namespace "urn:recipe:e-time:09";
source SyntheticCalendar { kind standard; jurisdiction "none"; number "E-CALENDAR"; }calendar Calendar { timezone "Asia/Almaty"; timezone_db "iana-tzdb@2026a"; period [@2024-01-01, @2028-01-01); source SyntheticCalendar; resource "resources/calendar-2024-2027.json"; format "law.calendar/0.1"; content_hash "sha256:dfd0181e1347cc2fd48b5fd81d27f3551cabae10eaefbf8b4dffb70bcbb3cd12";}deadline policy Days { start_count next_day; include_end true; roll next_working_day;}relation marker();Frozen execution scene
Section titled “Frozen execution scene”| Facts / cut | Question | Answer |
|---|---|---|
| 2024-01-05 + 1 business day | date | 2024-01-08 |
| 2027-12-30 + 1 business day | date | 2027-12-31 |
| 2027-12-31 + 1 business day | date | RUNTIME_ERROR, CALENDAR_OUT_OF_RANGE |
early year rolls forward
test "early year rolls forward" { given { context { legal_time @2026-03-10; decision_time @2027-12-31T09:00:00+05:00; knowledge_time @2027-12-31T09:00:00+05:00; timezone "Asia/Almaty"; deadline_policy Days; }
} evaluate add_business_days(@2024-01-05, 1 business_day); expect value == @2024-01-08;}late year rolls forward
test "late year rolls forward" { given { context { legal_time @2026-03-10; decision_time @2027-12-31T09:00:00+05:00; knowledge_time @2027-12-31T09:00:00+05:00; timezone "Asia/Almaty"; deadline_policy Days; }
} evaluate add_business_days(@2027-12-30, 1 business_day); expect value == @2027-12-31;}beyond coverage errors
test "beyond coverage errors" { given { context { legal_time @2026-03-10; decision_time @2027-12-31T09:00:00+05:00; knowledge_time @2027-12-31T09:00:00+05:00; timezone "Asia/Almaty"; deadline_policy Days; }
} evaluate add_business_days(@2027-12-31, 1 business_day); expect evaluation_status == RUNTIME_ERROR; expect issue(CALENDAR_OUT_OF_RANGE);}The calendar is synthetic: Mon–Fri, 9 March 2026 is a conventional non-working day; this is not an official calendar.
Counterfactual
Section titled “Counterfactual”teaches substitutes a number for timezone_db and requires E1305. The set bytes and the generated law.lock are verified separately, as is rejection of both resolution chains after the resource is corrupted.
Boundary
Section titled “Boundary”The set covers 2024–2027 in full; the node window is the same. This is a teaching calendar without official holidays and without a historical model of timezone transitions. Extending the period needs a new resource and a conscious update of all pins; other lock files are not rewritten.
Pitfall
Section titled “Pitfall”Two calendars without a chosen axis are not resolved by the first node. The resource digest and the node are pinned separately.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.