Examples

Each example states a rule in plain words, writes it as a Yrnk document, and shows how the engine judges it. The engine answers two questions: is this instant an occurrence, and was there an occurrence in this period?

Is this instant an occurrence?

A judgment at a point: for a timed occurrence, true when the instant equals the scheduled point to the second. (An all-day occurrence matches every instant of its day.)

Payday is the 25th at 10:00 — the transfer moves back to the previous bank business day when the 25th is not one.

A transfer needs the bank open, so the calendar is the bank's: closed on weekends, public holidays, and December 31 through January 3.

{
    "version": "1.2",
    "timezone": "Asia/Tokyo",
    "calendar": {
        "holidays": ["2026-07-20"],
        "business_holidays": ["2026-01-02", "2026-01-03", "2026-12-31"],
        "business_days": []
    },
    "schedules": [
        {"days": [25], "shift": ["prev", "or_same", "business_day"], "times": ["10:00"]}
    ]
}
July 2026
SunMonTueWedThuFriSat
1234
567891011
12131415161718
1920holiday21222324payday25moved
262728293031
  • occurrence
  • base day, moved by shift
matches 2026-07-24 10:00
true
The 25th is a Saturday, when banks are closed. The previous bank business day is Friday the 24th.
matches 2026-07-25 10:00
false
The payday moved away; nothing is left on the 25th.
matches 2026-07-24 10:30
false
A timed occurrence matches only its own instant, compared to the second.

The monthly report is due on the 25th at 10:00 — moved back to the previous business day of the company, which works on Saturday, July 25.

The schedule is the same line as payday; the calendar is the company's. A company business day and a bank business day are different things, so they live in separate documents.

{
    "version": "1.2",
    "timezone": "Asia/Tokyo",
    "calendar": {
        "holidays": ["2026-07-20"],
        "business_holidays": [],
        "business_days": ["2026-07-25"]
    },
    "schedules": [
        {"days": [25], "shift": ["prev", "or_same", "business_day"], "times": ["10:00"]}
    ]
}
July 2026
SunMonTueWedThuFriSat
1234
567891011
12131415161718
1920holiday2122232425workingdue
262728293031
  • occurrence
matches 2026-07-25 10:00
true
business_days lists the 25th: the company works that day, so the deadline stays.
matches 2026-07-24 10:00
false
Nothing needed to move. Payday, on the bank's calendar, is still the 24th — the company working on Saturday does not open the bank.

Garbage is collected on the 1st and 3rd Friday at 7:30 — skipped, not moved, when that day is a holiday.

{
    "version": "1.2",
    "timezone": "Asia/Tokyo",
    "calendar": {
        "holidays": ["2026-03-20"]
    },
    "schedules": [
        {"days": [["1st", "fri"], ["3rd", "fri"]], "if": ["not", "holiday"], "times": ["07:30"]}
    ]
}
March 2026
SunMonTueWedThuFriSat
1234561st Fri7
891011121314
151617181920holiday3rd Fri21
22232425262728
293031
  • occurrence
  • base day, dropped by if
matches 2026-03-06 07:30
true
The 1st Friday.
matches 2026-03-20 07:30
false
The 3rd Friday is Vernal Equinox Day, so if drops it.
matches 2026-03-19 07:30
false
if only filters. Unlike shift, it never moves a day.

The poller runs every 90 minutes, but only within business hours on business days.

{
    "version": "1.2",
    "timezone": "Asia/Tokyo",
    "calendar": {
        "holidays": [],
        "business_holidays": [],
        "business_days": [],
        "business_hours": [["09:00", "12:00"], ["13:00", "18:00"]]
    },
    "schedules": [
        {"days": ["business_day"], "times": {"every": [90, "minute"], "between": "business_hour"}}
    ]
}
Wednesday, July 15, 2026 — a business day
891011121314151617181909:0010:3013:0014:3016:0017:30
  • business hours
  • scheduled point
matches 2026-07-15 10:30
true
The grid starts at 09:00 — 09:00, then 10:30.
matches 2026-07-15 12:00
false
A window is half-open: 12:00 ends the morning and is not in it.
matches 2026-07-15 13:00
true
The grid starts over at each window.

Was there an occurrence in this period?

A judgment over a period asks what a scheduler asks on every tick: is there a scheduled point after the previous check, through now? The start is excluded — the previous check already counted it — and the end is included. Each check's “now” becomes the next one's start, so every timed point is seen exactly once. (An all-day occurrence counts in every period that overlaps its day.)

The same poller, asked about three separate periods.

A, B, and C are independent questions, not one check following another.

Wednesday, July 15, 2026 — a business day
891011121314151617181909:0010:3013:0014:3016:0017:30ABC
  • start, excluded
  • end, included
A: after 10:00, through 11:00
true
10:30 lies inside.
B: after 10:30, through 12:15
false
10:30 sits exactly on the start, which is excluded. The next point is 13:00.
C: after 12:15, through 13:00
true
A point exactly at the end counts.