mohebifar/calendar-bundle
A Symfony bundle that adds calendar date utilities to your application, with helpers for converting and formatting dates across different calendar systems. Lightweight and straightforward to wire into Symfony services, though community adoption is limited and documentation remains sparse.
This is a 0.1-beta release of a driver-based date/calendar package for Laravel. The only documented surface area is two drivers — Persian and Gregorian — and the explicit statement that no views or assets ship yet. Treat everything below as the expected shape of the package; confirm exact namespaces and method signatures against the repo before committing.
Install and pin. Because this is 0.1-beta, require it explicitly rather than floating:
composer require <vendor>/<package>:"0.1.*@beta"
Commit the lockfile. A beta at 0.1 signals the public API is not stable.
Look at the driver layer first. Open src/ and find the driver contract/interface and the two concrete drivers. That contract — not the README — is the real API. Check whether both drivers implement the same interface; if they don't, "driver" is a label, not a swappable abstraction.
Check for publishable config. Run php artisan vendor:publish and see whether anything is registered. A beta this early may hard-code the default driver instead of exposing config.
First use case: convert and format at the presentation boundary. Store timestamps in UTC/Gregorian in your database as usual, then use the Persian driver only when rendering (API resource, Blade echo, PDF, notification). The canonical first test is a round-trip: Carbon → Persian → Gregorian → assert equality with the original instant.
CalendarService (or a Blade directive / API Resource macro) that owns the package calls. When 0.1-beta breaks in 0.2, you patch one file instead of grepping your codebase.app()->getLocale(), and pass the Gregorian driver explicitly anywhere you serialise for storage or third-party APIs.Rule that parses with the Persian driver and rejects invalid dates (see Gotchas on month lengths).fa → persian, en → gregorian) plus a middleware or view composer keeps call sites clean and makes adding a third calendar later a config change.Carbon::setTestNow() and assert both drivers agree on the same instant. Add explicit cases for month boundaries and the Persian year-end.now() comparisons should stay on Carbon/UTC.0.1-beta with no prior assessment means there is no migration path and no deprecation policy yet. Pin the version, wrap the calls, and read the diff before every bump.@persianDate directive. Build your own UI and feed it strings from the driver. If your feature depends on a picker, this package is not ready for that feature.1402/12/29, 1403/12/30, and the Nowruz rollover explicitly — off-by-one-day errors here are the classic failure mode.verta/morilog/jalali output.How can I help you explore Laravel packages today?