aeon-php/calendar
Aeon Calendar is a time management framework for PHP that makes working with dates, times, time zones, and intervals easier through a clean, object-oriented API, backed by solid testing and clear documentation with examples.
compareTo) and utility checks (e.g., isMidnight), enabling safer financial transactions, audit logs, or scheduling where precision and immutability are critical.Time, Day, Month, DateTime), improving modularity for complex logic like:
compareTo for sorting or validation).isMidnight for batch jobs or daily resets).toString() support for Month (reverted from Stringable but now natively implemented) simplifies serialization for APIs or logging.TimeZone independence reduces friction for global apps.modify() method ensures reliability for features like subscription billing or historical data queries.8.1.10 aligns with modern Laravel/Lumen stacks, future-proofing adoption.Carbon + manual checks for midnight), reducing tech debt while adding battle-tested methods.Carbon hacks (e.g., midnight checks, comparisons, or timezone edge cases).Carbon and lack resources to migrate to immutable patterns.BETWEEN clauses) → Use Laravel’s query builder or Carbon.Carbon + IntlDateTimeZone.For Executives: *"This update makes the package even more robust for our time-sensitive workflows—think zero bugs in scheduling, payments, or compliance due to immutable dates and new comparison tools. For example:
isMidnight) prevent edge cases in batch jobs.compareTo) simplify payroll or project timelines.For Engineering: *"Key improvements in 1.0.7:
compareTo (for sorting/validation), isMidnight/isNotMidnight (for time-based logic).Time, Day, Month, etc., are now decoupled from construction, making them more flexible.modify(): Critical for date arithmetic in features like subscriptions.For Developers: *"You can now do this without hacks:
// Check if a time is midnight (no more manual parsing!)
$time = Time::fromString('00:00:00');
$time->isMidnight(); // true
// Compare dates safely (e.g., for sorting events)
$event1 = DateTime::fromString('2023-10-01');
$event2 = DateTime::fromString('2023-10-02');
$event1->compareTo($event2) < 0; // true
// Business calendars just got easier
$workday = Day::fromDateTime($now)->isWorkday(); // Respects holidays!
Start with:
isMidnight for batch jobs or daily resets.compareTo for sorting events or validation.TimeZone for global apps.
Prototype it for [specific task, e.g., ‘fix the midnight bug in our nightly reports’]."*How can I help you explore Laravel packages today?