Download the PHP package php-alchemist/chrono-smith without Composer
On this page you can find all versions of the php package php-alchemist/chrono-smith. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download php-alchemist/chrono-smith
More information about php-alchemist/chrono-smith
Files in php-alchemist/chrono-smith
Download php-alchemist/chrono-smith
More information about php-alchemist/chrono-smith
Files in php-alchemist/chrono-smith
Vendor php-alchemist
Package chrono-smith
Short Description A reusable, deterministic Scheduling Engine for PHP.
License MIT
Package chrono-smith
Short Description A reusable, deterministic Scheduling Engine for PHP.
License MIT
Please rate this library. Is it a good library?
Informations about the package chrono-smith
ChronoSmith
ChronoSmith is a reusable, deterministic scheduling engine for PHP 8.4+. It models recurring obligations with a compact, versioned DSL (CS=1) and separates schedule intent from mutable schedule progress.
The engine is domain-agnostic: it computes schedule dates, records progress, and derives status such as overdue without knowing anything about billing, memberships, reminders, jobs, or any other application domain.
Installation
Core Concepts
- Schedule Definition: Mostly immutable recurrence intent: start date, interval, anchor, roll policy, stickiness, due mode, end date, occurrence limits, timezone metadata, grace period, namespace, and opaque metadata.
- Schedule State: Mutable progress through obligations:
cursor,last,next, andrem. - Cursor Stability: Advancement is based on the scheduled due date (
cursor), not the actual occurrence date (last). Early or late completion does not cause anchor drift. - Derived Overdue Status: Overdue is never stored. It is derived at runtime with
now > next + grace. - Versioned Codec: DSL hydration and serialization are handled by versioned codecs using read-old/write-latest semantics.
DSL Example
Important fields:
s: start date, written as@YYYY-MM-DDi: interval, such as1d,1w, or1ma: optional anchor, such asdowFRI,dom30, oreomr: monthly roll policy,backorforwardstick: monthly stickiness,domoreommode: due semantics,onorbyn/rem: max and remaining occurrencese: end date; no occurrences after this dategr: grace period used by overdue derivationns: PHP-style namespace/class-name metadata, preserved exactlymeta64: opaque base64url metadata
Quick Start
Common Operations
Check Overdue Status
Stop After a Set Number of Occurrences
Preserve Namespace and Metadata
Features
- Daily, weekly, and monthly recurrence
- Weekday, day-of-month, and end-of-month anchors
- Monthly roll policies for invalid calendar dates
- Monthly stickiness for returning to a day-of-month or staying end-of-month
- Early and late completion without anchor drift
nextDue(),advance(),satisfyNext(),isOverdue(),hydrate(), andserialize()- End date and occurrence-count limits
- Grace-period based overdue derivation
- PHP-style namespace metadata preserved byte-for-byte
- Opaque base64url metadata via
meta64 - Unknown field preservation for forward compatibility
- Versioned codec registry
Examples
Executable examples live in examples/:
- Minimal daily schedule
- Monthly anchor rolls
- Satisfy without anchor drift
- Overdue with grace
- Namespaces, metadata, and unknown fields
- End date and occurrence limits
- Weekly
mode=by
Run one from the repository root:
Documentation
- DSL Specification
- Architecture Overview
- Usage Guide
Development
Requirements
- PHP 8.4+
- Composer
License
MIT
All versions of chrono-smith with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.4
The package php-alchemist/chrono-smith contains the following files
Loading the files please wait ...