Skip to content
DTRExpDTRExp

Date-Time Range & Recurrence Expression — a compact string expression for describing "when", evaluated by coverage.
T0900:1800 E1:5 Mon–Fri, 09:00–18:00
E7#-1 M4 last Sunday of April, every year
20200106/10D every 10 days from 2020-01-06
D13 E5 every Friday the 13th
D-7:* Y* last 7 days of every year
M!7 every month except July
m0:19 H0/4 Leonardo da Vinci's sleep (per the legend)

A DTRExp denotes a possibly infinite set of time intervals. You don’t expand it into dates; you ask it questions: does it cover this instant? What does it cover between these two dates? When does it next apply?

◆

Coverage

Membership is the primitive, not enumeration. “Every Monday, forever” stays an expression; covers(now) answers without generating a single date.

◆

Fast

One calendar-field extraction, then per-component integer tests. Built for the hot path; an access-control check on every request.

◆

Compact

A short literal that fits in a database column, a JSON value, an ACL grant or a config file. No multi-property envelope.

◆

Tested

Conformance is defined by test vectors, not prose. Six zero-dependency implementations pass all of them; the Rust core also ships as WASM.