PHPackages                             yarunoka/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. yarunoka/core

ActiveLibrary

yarunoka/core
=============

Calendar-aware schedule DSL and pure occurrence query engine

0.3.0(yesterday)01↑2900%MITPHP ^8.4

Since Jul 22Compare

[ Source](https://github.com/yarunoka-dev/php-core)[ Packagist](https://packagist.org/packages/yarunoka/core)[ Docs](https://github.com/yarunoka-dev/php-core)[ RSS](/packages/yarunoka-core/feed)WikiDiscussions Synced today

READMEChangelog (3)Dependencies (3)Versions (6)Used By (0)

yarunoka/core
=============

[](#yarunokacore)

[![CI](https://github.com/yarunoka-dev/php-core/actions/workflows/ci.yml/badge.svg)](https://github.com/yarunoka-dev/php-core/actions/workflows/ci.yml)[![Latest Version](https://camo.githubusercontent.com/1af641f66d99241884bd2def817212c515ceba7f8ab69d377733bdf239a3b88d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796172756e6f6b612f636f7265)](https://packagist.org/packages/yarunoka/core)[![PHP Version](https://camo.githubusercontent.com/6c8feaf6a05259735e5d47f15642f342bc3ce413c6a0859b0c8fc81f65abbcd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f796172756e6f6b612f636f7265)](https://packagist.org/packages/yarunoka/core)[![License](https://camo.githubusercontent.com/7cf4b0c392b659bf72be3403b13dca6b50fc6169251e824925e4fd2b80f4f1ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f796172756e6f6b612f636f7265)](LICENSE)[![Downloads](https://camo.githubusercontent.com/2bcfd31c4d4327c682849b41431b09467dcccd18dcc8e9bd5763d14df1685048/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f796172756e6f6b612f636f7265)](https://packagist.org/packages/yarunoka/core)

Calendar-aware schedule DSL and pure occurrence query engine.

What is Yarunoka?
-----------------

[](#what-is-yarunoka)

Real-world schedules are calendar rules, not clock rules. "Payday is the 25th — moved up to the previous business day when that falls on a weekend or a holiday." "Collection day is the second Tuesday of every month." "The poller runs every 90 minutes, but only within business hours." Cron expressions and plain timestamps cannot carry these rules, so they end up as scattered application code — hard to store, hard to display, and impossible for users to edit safely.

Yarunoka is a small JSON DSL — **Yrnk** — that states such rules as data, plus an engine that answers questions about them:

- **A document** carries a timezone, a **calendar**, and a list of **schedules**. The calendar is the definitions that give meaning to the calendar vocabulary: holidays, business holidays, extra business days, the workweek, business hours, and custom named date sets. A date set is written as a fixed date list or as the name of a resolver the application registers at runtime.
- **A schedule** combines a day expression (days of the month, weekdays, ordinal weekdays, calendar words such as `holiday`, day cycles), an optional **shift** rule ("the previous business day"), and the times of day (fixed points, grids such as every 90 minutes, or all-day).
- **The engine is pure.** It executes no jobs and persists no state; it answers "does this date-time match?" and "was there an occurrence in this interval?". Firing, catch-up, and throttling remain design decisions of the caller.

The name is the Japanese question **やるのか？** (*yaru no ka?*) — roughly "so, do we do it?". That is the question this engine exists to answer.

The DSL is language-independent and specified in the [spec repository](https://github.com/yarunoka-dev/spec). This package is its PHP implementation.

Warning

The 0.x releases exist to exercise the release pipeline and to track the specification on its way to 1.0.0. They are **not intended for use**. This notice will be removed at 1.0.0.

Installation
------------

[](#installation)

```
composer require yarunoka/core
```

Requires PHP 8.4 or newer. No runtime dependencies.

Quick example
-------------

[](#quick-example)

```
use Yarunoka\Parser\YrnkParser;
use Yarunoka\YrnkEvaluator;

$json = calendar,
    timezone: $document->timezone,
);

// 2026-07-25 is a Saturday, so the payday shifts back to Friday the 24th.
$evaluator->matches($payday, new DateTimeImmutable('2026-07-24T10:00:00+09:00')); // true
$evaluator->matches($payday, new DateTimeImmutable('2026-07-25T10:00:00+09:00')); // false

// The poller's question: was there an occurrence since the last run?
$lastRunAt = new DateTimeImmutable('2026-07-24T09:55:00+09:00');
$now = new DateTimeImmutable('2026-07-24T10:05:00+09:00');
$evaluator->hasMatchIn($payday, $lastRunAt, $now); // true
```

Documentation
-------------

[](#documentation)

- [Using the PHP implementation](docs/php-usage.md) — the public classes, the two contexts, and the typical firing-decision patterns
- [The spec repository](https://github.com/yarunoka-dev/spec) — the DSL specification. The JSON Schemas under `schema/` are a verbatim copy of the spec's (the spec declares that every language implementation carries a copy)
- The Laravel bridge is the separate [yarunoka/laravel](https://github.com/yarunoka-dev/php-laravel) package

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d9a347b923d31bcf4136cffd64ed1a96fac78b92484b091ea94fe7dccdd40eab?d=identicon)[chatii](/maintainers/chatii)

---

Tags

scheduleDSLrecurrencecalendarholidaysschedulingbusiness daysoccurrence

### Embed Badge

![Health badge](/badges/yarunoka-core/health.svg)

```
[![Health](https://phpackages.com/badges/yarunoka-core/health.svg)](https://phpackages.com/packages/yarunoka-core)
```

###  Alternatives

[azuyalabs/yasumi

The easy PHP Library for calculating holidays

1.1k12.8M35](/packages/azuyalabs-yasumi)[spatie/laravel-google-calendar

Manage events on a Google Calendar

1.4k1.8M21](/packages/spatie-laravel-google-calendar)[league/period

Time range API for PHP

7335.8M24](/packages/league-period)[laraveljutsu/zap

A flexible, performant, and developer-friendly schedule management system for Laravel

1.5k120.4k1](/packages/laraveljutsu-zap)[wilianx7/php-recurring

PHP library for generating recurring dates, schedules, and repeated task recurrences.

1050.7k](/packages/wilianx7-php-recurring)[umulmrum/holiday

A PHP library to compute holidays. It's something :-)

93385.8k1](/packages/umulmrum-holiday)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
