Package
Simshaun Recurr
PHP library for working with recurrence rules
Overview
What Simshaun Recurr does
Recurr is a PHP library designed to handle recurrence rules by translating them into DateTime objects, enabling developers to manage recurring events efficiently.
Originating as a precursor to a calendar application with recurring events, Recurr simplifies the process of creating and managing recurrence rules defined by the iCalendar standard (RFC 5545). The library draws inspiration from rrule.js, providing a way for PHP developers to generate and manipulate recurrence patterns such as daily, weekly, or monthly schedules.
Developers can create a new recurrence rule by passing a string or array representing the rule, alongside optional start and end dates and a timezone. This flexibility allows for both static and programmatic construction of rules. Once defined, rules are transformed into DateTime objects using the provided transformer, which generates a collection of Recurrence objects that include start and end methods.
Notably, the library also offers constraints and filters to further refine which dates are included in the recurrence collection. For instance, start-before or end-after constraints can be applied, reducing the result set to relevant entries. Additionally, it includes post-transformation filtering options, enhancing its utility in complex scheduling scenarios.
Recurr supports translating recurrence rules into human-readable text, although this is currently a beta feature and primarily limited to major frequency types. This aspect is particularly useful for applications needing to display recurrence details in a user-friendly format.
This overview was generated by AI from the package README and may not reflect the latest release.
Read the full README →