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

Hijri Date Laravel Package

remls/hijri-date

remls/hijri-date is a lightweight PHP package for working with Hijri (Islamic) calendar dates, offering Gregorian-to-Hijri conversion and formatting helpers for Laravel and standalone PHP applications.

View on GitHub
Deep Wiki
Context7

Laravel helper package for Hijri dates.

Frequently asked questions about Hijri Date
How do I install remls/hijri-date in a Laravel application?
Install it with Composer using composer require remls/hijri-date, then confirm the package appears in your composer.json and composer.lock. If the package ships a service provider with Laravel auto-discovery, no manual registration should be needed, but verify this in the package source or README. Pin an explicit version rather than a floating constraint so a surprise release cannot change date output under you.
Does remls/hijri-date support Laravel auto-discovery and which Laravel and PHP versions does it work with?
Auto-discovery is likely supported because it is presented as a Laravel helper package, but you should confirm the extra.laravel providers entry in its composer.json before relying on it. Likewise, check the require block for explicit illuminate/support and php version constraints rather than assuming current Laravel support. Test the package against your exact Laravel and PHP versions in CI, since a low-adoption package may not track every framework release.
How do I convert a Gregorian date to a Hijri date using remls/hijri-date?
The package exposes helper functions for converting and formatting Hijri dates, so a typical call takes a Gregorian date or DateTime instance and returns a Hijri year, month, and day or a formatted string. Always pass an explicit timezone rather than relying on the server default, because the conversion result can shift by a day near boundaries. Wrap the helper in your own adapter class instead of calling it directly from controllers, models, and Blade views.
Which Hijri calendar variant does remls/hijri-date implement, Umm al-Qura or tabular Islamic?
This is the most important question to answer before adopting the package, and it may not be clearly documented. Umm al-Qura, tabular Islamic arithmetic, and observational calendars can differ by a day or more, which matters for religious and official use. Read the conversion source code, compare outputs against authoritative dates for several years, and record the method you confirmed in your internal documentation.
Can I use remls/hijri-date in a plain PHP project without Laravel?
It is described as usable in standalone PHP applications as well as Laravel, so the conversion logic is probably framework-independent. The Laravel-specific part is likely just an optional service provider and helper loading. Verify by installing it in a bare Composer project and calling the conversion API without booting a Laravel application.
Does remls/hijri-date handle timezones, sunset day boundaries, and Hijri leap years correctly?
Timezone and day-boundary handling is a common failure point in Hijri conversion packages, and the evaluation notes this as an unresolved risk here. Islamic days traditionally begin at Maghrib, while most libraries simply convert a civil date, so decide which behaviour your product needs. Check leap-year and month-length handling with dates around Hijri month ends, and test the same input under different timezones to see whether the output shifts.
Is remls/hijri-date safe to use for scheduling, billing, or official religious dates in production?
It is better treated as a display and formatting layer, not as the canonical source of truth for scheduling, billing, or religious date logic. The package has limited adoption and maintainer depth, and an off-by-one-day error is high impact where users expect official accuracy. If you adopt it, isolate it behind an internal converter interface, add contract tests, feature-flag the surface, and pilot on a low-risk screen first.
How do I test that remls/hijri-date returns correct Hijri dates?
Build a fixture set of known Gregorian-to-Hijri date pairs from an authoritative source and assert the package reproduces them exactly. Include edge cases such as Hijri month starts, leap-year boundaries, Ramadan and Eid dates, and inputs converted in several timezones. Cross-check with an independent implementation such as PHP IntlCalendar using an Islamic calendar where available, and commit those vectors as regression tests.
What are the alternatives to remls/hijri-date for Hijri date conversion in PHP?
PHP's Intl extension can produce Islamic calendar output through IntlCalendar and IntlDateFormatter, which avoids an extra dependency if intl is installed. Other Composer packages and general date libraries also cover Islamic calendars with varying levels of Umm al-Qura accuracy. Compare candidates against the same authoritative date vectors and pick the one whose calendar method and maintenance status match your requirements.
Is remls/hijri-date actively maintained, and will it survive future Laravel upgrades?
Adoption and maintainer depth appear limited, so plan for internal ownership rather than assuming an SLA or timely fixes. Pin the version, monitor releases and dependency advisories, and keep a fork or replacement path ready in case the package stalls. Because it is a thin layer wrapped in your own adapter, swapping it for another implementation or IntlCalendar later should be a contained change rather than a rewrite.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource