A modern, object-oriented PHP library for calendar management, period iteration, and event handling.
CalendR is a modern, object-oriented calendar management library for PHP 8.2+. It provides an immutable, iterable API to manipulate time periods (like Years, Months, Weeks, Days) and manage events associated with those periods. It solves the problem of error-prone date and time manipulation by offering a clean, object-oriented alternative to working with strings or timestamps.
PHP developers building applications that require calendar functionality, date range calculations, or event scheduling, especially those using Symfony or Twig.
Developers choose CalendR for its immutable design, zero dependencies, and intuitive iterable API that makes calendar logic safer and more expressive than traditional PHP date functions. Its seamless Symfony and Twig integrations reduce boilerplate code in web applications.
A modern, object-oriented calendar management library for PHP 8.2+.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Built on DateTimeImmutable, ensuring all date manipulations are side-effect free and thread-safe, which prevents common bugs in date handling.
Allows using native PHP foreach loops to iterate over periods, such as getting all months in a year or days in a month, making calendar logic more expressive and readable.
The core library has no external dependencies, keeping it lightweight and easy to integrate into any PHP project without bloating the vendor directory.
Includes a Symfony Bundle and Twig extensions that reduce boilerplate code, providing seamless integration for web applications using these technologies.
Event management requires implementing ProviderInterface for each data source, which can be cumbersome and time-consuming compared to libraries with built-in event storage.
Requires PHP 8.2 or higher, excluding projects stuck on older PHP versions without the ability to upgrade, as noted in the README.
Focuses on calendar periods but lacks built-in support for complex date calculations like business days, holidays, or time zone manipulations, requiring additional custom logic.