Skip to content
Laravel Rust Packagev1.xMIT License0+ downloadsAI Ready · Agent Skills

Hijri: Hijri dates for Laravel Rust

Register one provider and every view can print "1 Ramadan 1445" with {{ post.created_at|hijri }}, every form can validate a Hijri date, every model can keep one in an AsHijri column, and every handler gets a converter with your adjustment, all set from HIJRI_* environment variables. It is AI ready: the crate bundles an agent guideline and a hijri-development skill for your application's AGENTS.md and .agents/skills/.

$cargo add pharaonic-laravel-hijri

Compatibility

Each line is released for the versions in its row, read from that release's composer.json. Pick the line that matches your project; a combination not listed isn't supported. Find the right line of every package for your project.

LineLatest releaseRustLaravel RustStatusDocs
v1.xv1.0.0 Dec 2, 20261.99+0.1 – 1.xCurrent Docs: Read the v1.x docs

Maintenance

Latest release
v1.0.0
Dec 2, 2026 (17 hours ago)
Released lines
1
documented lines with a release; see compatibility
CI on develop
Not available right now
GitHub Actions status

From the package's releases and its GitHub Actions. A passing run means the test suite passed on develop, on every PHP version it supports; it isn't a security review, and each release line has its own runs on GitHub. Checked hourly.

A quick look

Convert a date with the configured adjustment inside a handler.

src/http/controllers/events.rs
1use laravel::config::Section;
2use laravel::time::civil::date;
3use pharaonic_laravel_hijri::HijriConfig;
4 
5pub async fn ramadan(hijri: Section<HijriConfig>) -> laravel::Result<String> {
6 let date = hijri.converter().to_hijri(date(2024, 3, 11))?; // 1445-09-01
7 
8 Ok(date.strftime(&hijri.format, hijri.language)?) // "1 Ramadan 1445"
9}
Key Features

Everything you need for Hijri dates in Laravel Rust

One provider, four environment variables, and the calendar of Pharaonic Hijri.

Template Filter

{{ post.created_at|hijri }} prints a Hijri date in any MiniJinja view.

Validation Rule

#[validate(required, HijriDateRule)] accepts only real YYYY-MM-DD Hijri dates.

Environment Configuration

Set the adjustment, format, language and time zone with HIJRI_* variables, so created_at shows your users' day.

Arabic and English Months

Month names in Arabic or English, per application or per date.

Model Columns

AsHijri stores the Gregorian date in a date column and reads it back as Hijri.

AI Ready

Bundles an agent guideline and a hijri-development skill, so Claude Code, Cursor, Codex or Amp learn the whole package from your .agents/skills/.

FAQ

Hijri Questions

Quick answers about installing and using Hijri.

What is Hijri?

Hijri (Islamic) dates for Laravel Rust applications. Configure the day adjustment, language and time zone once, show dates with a hijri template filter, validate them in forms, and store them in model columns. It's a free, open-source Laravel Rust package by Pharaonic.

How do I install Hijri?

Run cargo add pharaonic-laravel-hijri --features minijinja in your project's root directory, then add providers.add(pharaonic_laravel_hijri::HijriServiceProvider); to src/app.rs. Leave out --features minijinja if your application doesn't render MiniJinja views.

What does Hijri require?

The latest release requires Rust 1.99+ and Laravel Rust 0.1 – 1.x.

Which Rust version does it need?

The latest release requires Rust 1.99+ and Laravel Rust 0.1 – 1.x. It follows the Rust version of the Laravel Rust framework.

Which Cargo features does it have?

Two, both off by default: minijinja registers the hijri template filter, and database adds the AsHijri model column. Neither picks a database or forces MiniJinja on Inertia applications.

Can a model column hold a Hijri date?

Yes. With the database feature, declare the field as AsHijri. The database keeps the Gregorian date in a date column, and the model reads it back as a Hijri date with your HIJRI_ADJUSTMENT, like the AsHijri cast of the Laravel (PHP) package.

How do I change the day adjustment?

Set HIJRI_ADJUSTMENT in your .env. The default is -1, the same as the Laravel (PHP) package, and 0 uses the tabular calendar as it is.

Is Hijri free to use?

Yes. Hijri is open source under the MIT license, so you can use it in personal and commercial projects.

Where can I find the Hijri documentation?

Read the Hijri documentation for setup, configuration, and usage examples.

How do I report a bug or contribute to Hijri?

Open an issue or a pull request on GitHub, ask in GitHub Discussions, or chat with us on Discord.

Ready to dig in?

Read the full documentation for installation, the HIJRI_* configuration, the template filter, the validation rule, model columns, converting dates in your own code, and the API reference.