Temporal-native
Built on the TC39 Temporal proposal. Uses globalThis.Temporal on Node 26+ and modern
browsers. Falls back to any Temporal polyfill via setTemporal(). No date math hacks.
Temporal-native
Built on the TC39 Temporal proposal. Uses globalThis.Temporal on Node 26+ and modern
browsers. Falls back to any Temporal polyfill via setTemporal(). No date math hacks.
Zero runtime dependencies
The library has no bundled dependencies. Temporal is accessed via globalThis.Temporal or an
injected polyfill. Your bundle only pays for what you import.
TypeScript-first
Every function has precise return types. parse() returns Result<RRuleOptions, string>.
validate() returns Result<RRuleOptions, ValidationError[]>. No silent failures.
Differential conformance suite
Every expansion result is compared against python-dateutil 2.9.0 as the ground-truth oracle, and rrule.js as a known-divergence reference. Behavior is provably correct, not just tested in isolation.
rrule-ts | rrule | rrule-temporal | |
|---|---|---|---|
| Temporal-native | Yes | No | Partial |
| Zero runtime dependencies | Yes | No | No |
| TypeScript-first | Yes | Types via @types | Yes |
| Differential conformance suite | Yes | No | No |
| Strict RFC 5545 validation | Yes | Partial | Partial |
| Subpath tree-shaking | Yes | No | No |
npm install rrule-tsOn Node.js versions below 26, inject a Temporal polyfill before using date-expansion features:
import { setTemporal } from 'rrule-ts'import { Temporal } from 'temporal-polyfill'
setTemporal(Temporal)On Node.js 26 and above, globalThis.Temporal is used automatically.
import { parse, validate, stringify } from 'rrule-ts'
const result = parse('RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR;COUNT=10')if (!result.ok) { console.error(result.error) process.exit(1)}
const validation = validate(result.value)if (!validation.ok) { for (const e of validation.error) { console.error(`${e.ruleId}: ${e.message}`) } process.exit(1)}
console.log(stringify(validation.value))// RRULE:FREQ=WEEKLY;COUNT=10;BYDAY=MO,WE,FRIntroduction
Understand the design, install the library, and set up the Temporal polyfill. Read the introduction
Quickstart
Go from a RRULE string to validated, expanded occurrences in minutes. Read the quickstart
Conformance
See how every expansion result is verified against python-dateutil and rrule.js. View the conformance suite
GitHub
Source code, issues, and the differential conformance corpus. View on GitHub