Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Calendr Laravel Package

yohang/calendr

Calendr is an object-oriented PHP calendar library for creating, managing, and rendering calendars and events. It supports recurring events, multiple calendars, and flexible output via renderers, making it easy to integrate scheduling into PHP applications.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on the "date domain" layer. Every calendar-shaped feature — booking, availability, renewal cycles, reporting periods — sits on period math (DST boundaries, leap years, ISO week numbering, month-end clamping). Calendr provides Period, Day, Week, Month, Year, and range primitives with iteration and containment/overlap checks, replacing hand-rolled strtotime arithmetic. That is roughly 1–2 engineer-weeks bought back, plus a whole class of production bugs avoided.
  • Feature scoping — it tells you what you are not buying. This is a calendar model + renderer, not a scheduling engine. It gives you period math, iteration, event association, and HTML/Twig output. It does not give you slot generation, availability rules, buffers, capacity, or conflict resolution, and recurrence is delegated to a Recurr integration you wire yourself. So it supports a "render a month of things" decision — not a "ship Calendly" decision. Being explicit about this boundary early prevents a roadmap miscommitment.
  • Roadmap justification. Worth adopting when two or more upcoming epics are calendar-shaped (e.g., a bookings module and a billing-period module); the shared primitives then pay for themselves. Not justified for a single isolated date picker.
  • Complementary to Carbon, not a replacement. It is deliberately framework-agnostic and built on DateTimeImmutable. Position it as the domain layer beneath your Laravel date handling, with conversion at the boundary — not as a second competing date vocabulary.
  • Reporting and billing correctness. Period iteration makes "group by month/quarter/fiscal window," proration, and trial-expiry calculations materially cleaner in application code.
  • Sizing signal: keep expectations right. 467 stars, opportunity score 3.47 — treat this as an infrastructure utility, not an ecosystem bet. It does not need to be strategic to be correct, but it should never appear on a roadmap slide.

When to Consider This Package

Adopt when:

  • Calendar and period concepts are first-class domain objects (bookings, availability, resource planning, subscription cycles, payroll, reporting windows), not a one-off date field.
  • You want server-rendered calendars in Blade/Twig and don't want to build a renderer. Laravel caveat: there is no service provider or facade — budget a thin container binding yourself (about half a day).
  • Your stack is PHP 8.2+ and you're comfortable pinning a small, single-maintainer dependency. The December 2025 release is a healthy maintenance signal; the bus factor is still 1.
  • You need recurring-event plumbing and will own the Recurr + persistence wiring. A Doctrine provider exists; Eloquent does not — expect to implement an event-manager adapter.
  • You want a dependency-light model that unit-tests cleanly without bootstrapping a framework.

Look elsewhere when:

  • You need real availability logic (free/busy, buffers, timezone-correct slot generation, conflict resolution). Buy a scheduling product or use a dedicated library.
  • You need iCalendar/ICS import-export, CalDAV, or two-way Google/Outlook sync as a product requirement — that is a much larger and different dependency decision.
  • Carbon's CarbonPeriod, diffIn*, and isoWeek already cover ~80% of your need; adding a second date vocabulary is a real DX tax for the team.
  • The team is weak on timezone semantics — a library won't rescue you; this needs a documented invariant, not a dependency.
  • You'd be the only consumer in a large application and the calendar is one dashboard widget.

Gating questions before adoption: (1) How many places actually need period math? (2) Do we need rendering, or only computation? (3) Who owns the Recurr/Eloquent adapter? (4) Are we willing to wrap it behind our own CalendarService interface so it stays swappable?

How to Pitch It (Stakeholders)

Executives: "A cheap, MIT-licensed utility that removes a known source of scheduling bugs — timezones, month-end, leap years — from our booking and reporting features. No licensing cost, no vendor, no data leaving our infrastructure. The risk is maintenance (one primary maintainer), which we mitigate by wrapping it behind our own interface so it can be swapped in a day. Recommendation: adopt narrowly for calendar-shaped epics, not as a platform standard."

Engineering: "PHP 8.2+, framework-agnostic, DateTimeImmutable-based. Gives us Day/Week/Month/Year/Range period objects with iteration and containment/overlap checks, event association, and HTML/Twig renderers. It is not a scheduler — no slots, availability, capacity, conflict resolution, or native ICS. There is no Laravel integration, so budget a container binding plus an event-manager adapter if we persist events with Eloquent. Wrap it behind an internal interface; do not let Calendr\ types leak into controllers or Eloquent models. Test DST edges and month-end in our own suite regardless — the library handles the period math, but our business rules around it are still ours."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names