Kairos 1.0 — a schedule language where "3 business days before month-end" is an expression
Today I tagged 1.0 of Kairos , a schedule definition language I've been building — a small DSL where schedules like "3 business days before month-end" or "payday on the 25th, previous business day if it's a holiday" are single expressions. premise US { calendar-system: Gregorian; calendar: NYSE; tz: "America/New_York"; wkst: Sun } @US monthEnd |> roll(Preceding, on: bizDay) |> shift(-3, unit:…
Kairos 1.0 is a schedule definition language that allows users to express complex scheduling rules using single expressions. For example, the schedule "3 business days before month-end" can be represented as a single expression. The premise of Kairos includes a Gregorian calendar system, the New York Stock Exchange calendar, and the America/New_York timezone.
The language supports various scheduling concepts such as roll, shift, and specific time units like business days. Kairos resolves the issue of scheduling expressions not composing and not accounting for holidays, unlike Quartz and RRULE. The derived streams from Kairos can feed further definitions, making it a more flexible and powerful tool.
The reference implementation of Kairos runs client-side and has undergone rigorous testing, including doctests, to ensure stability across different environments. With its focus on closure and machine-readable annotations, Kairos aims to provide accurate and auditable scheduling results. The 1.0 release signifies that the language is frozen in terms of semantics, operators, grammar, and lexis.
The reference implementation is a prototype written in TypeScript with zero runtime dependencies. The documentation is available in both Japanese and English, with the Japanese documentation developed first and an English mirror of the spec, operator reference, and standard library guides. Developers can provide feedback and explore use cases that Kairos can handle through the official repository and website.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.