rrule
0.2.18, released 10 months ago by wanke.dev
Recurrence rule parsing, calculation, and formatting as defined in the iCalendar RFC.
What it does
Parses, calculates, and converts recurrence rules (RRULE) defined by the iCalendar RFC. Supports generating concrete date instances from rules, serializing to and from strings and JSON, and converting rules into human-readable text.
AI-written summary of version 0.2.18, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to handle calendar events with recurring schedules.
- You need to parse or generate iCalendar RFC 5545 RRULE strings.
Skip it when
- You need built-in handling for complex local time zones and daylight saving transitions within the recurrence calculation itself.
Strengths
- Compliant with the iCalendar RFC specification for RRULEs.
- Supports serialization to/from strings and jCal JSON.
- Provides human-readable text generation for rules in multiple languages.
Weaknesses
- Does not handle time zones natively; all input DateTimes must be in UTC.
- Custom week starts (WKST) are not supported (Monday is hardcoded).
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
final rrule = RecurrenceRule(
frequency: Frequency.weekly,
interval: 2,
byWeekDays: {
ByWeekDayEntry(DateTime.tuesday),
ByWeekDayEntry(DateTime.thursday),
},
byMonths: {12},
);
final Iterable<DateTime> instances = rrule.getInstances(
start: DateTime.now().copyWith(isUtc: true),
);Alternatives
Packages that do the same job and could replace rrule.
- uri
Utilities for building and parsing URIs, including RFC 6570 template support
50Compare - enough_icalendar
Parse, generate, and respond to iCalendar (.ics) invites in pure Dart.
59Compare - any_date
Parse strings in any format or language into DateTime objects, respecting ISO and RFC standards.
57Compare - version
Parses and compares semantic version numbers in compliance with http://semver.org/
50Compare
Works with
Packages commonly used together with rrule: ones it builds on, ones built on it, and its own family.