A lightweight and fast PHP library for calculating recurring dates and events based on RFC 5545 recurrence rules.
RRULE for PHP is a library that implements recurrence rules (RRULE) from the iCalendar standard (RFC 5545) to calculate repeating dates and events. It solves the problem of handling complex recurrence patterns in PHP applications, such as calendar events that repeat monthly, weekly, or with custom intervals. The library provides a lightweight, fast, and standards-compliant way to generate and iterate over recurring dates.
PHP developers building applications that require recurring event logic, such as calendar systems, scheduling tools, booking platforms, or any application needing to manage repeating dates.
Developers choose RRULE for PHP because it offers a strict, RFC-compliant implementation with better performance and clarity than existing alternatives. Its human-readable output and iterator interface make it easy to integrate, while its commented codebase provides transparency into the underlying algorithms.
Lightweight and fast recurring dates library for PHP (RFC 5545)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Strictly implements the iCalendar standard, ensuring reliable interoperability with other calendar systems. The README notes it rejects non-compliant rule combinations for correctness.
Optimized for performance with minimal dependencies, making it efficient for calculating recurring dates. The README highlights this as a key feature and includes benchmarks in its tests.
Includes a humanReadable() method that generates natural language descriptions of recurrence rules, improving user experience. The basic example demonstrates this with output like 'monthly on the 1st of the month'.
Implements PHP's Iterator interface, allowing easy iteration over occurrences using foreach loops. The basic example shows this in action for looping through dates.
Rejects non-compliant rule combinations that other libraries might accept, ensuring adherence to the standard. The README's 'Note' section explains this as a deliberate design choice for reliability.
It rejects many non-compliant rule combinations accepted by libraries like python-dateutil, which can cause compatibility issues with existing data or require stricter input validation upfront.
The humanReadable() method recommends the intl extension for best functionality, but it's not strictly required, potentially limiting output quality in environments without it.
Solely focused on RRULE implementation, so it lacks broader date manipulation features like timezone handling or exception dates, requiring integration with other libraries for full calendar functionality.
Complete documentation is hosted in a separate wiki, which might be less accessible or integrated than inline documentation, potentially increasing setup time for developers.