PHPackages                             reloadlife/hijri - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. reloadlife/hijri

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

reloadlife/hijri
================

PHP library to convert Gregorian date to Hijri date and vice versa

1.1.6(7y ago)0554MITPHPPHP &gt;=7

Since May 5Pushed 7y agoCompare

[ Source](https://github.com/reloadlife/hijri-dates)[ Packagist](https://packagist.org/packages/reloadlife/hijri)[ RSS](/packages/reloadlife-hijri/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (14)Used By (0)

Hijri date
==========

[](#hijri-date)

a PHP library to convert Gregorian date to Hijri date and vice versa.

It's based on [nesbot/carbon](https://github.com/briannesbitt/Carbon) package.

Installation
------------

[](#installation)

```
	composer require geniusts/hijri-dates
```

Usage
-----

[](#usage)

- you can immediatly get the hijri date with `Date` class function.

```
	$now = \GeniusTS\HijriDate\Date::now();
	$today = \GeniusTS\HijriDate\Date::today();
	$tomorrow = \GeniusTS\HijriDate\Date::tomorrow();
	$yesterday = \GeniusTS\HijriDate\Date::yesterday();
```

- to convert from Gregorian date to Hijri Date.

```
	$date = \GeniusTS\HijriDate\Hijri::convertToHijri('2017-05-05');
```

- to convert from Hijri date to Gregorian Date.

```
	// This function return a Carbon instance.
	$date = \GeniusTS\HijriDate\Hijri::convertToGregorian(8, 8, 1438);
```

- get date formated string.

```
	use GeniusTS\HijriDate\Date;

	$today = Date::today();

	// use the second parameter to return indian numbers
	echo $today->format('l d F o', Date::INDIAN_NUMBERS);
```

Configurations
--------------

[](#configurations)

- Changing the adjustment days.

```
	\GeniusTS\HijriDate\Hijri::setDefaultAdjustment(1);
```

- Changing the translation language.

```
	use GeniusTS\HijriDate\Translations\Arabic;

	\GeniusTS\HijriDate\Date::setTranslation(new Arabic);
```

- Changing the default toString format language.

```
	\GeniusTS\HijriDate\Date::setToStringFormat('l d F o');
```

- Changing the default numeric system.

```
	use GeniusTS\HijriDate\Date;

	Date::setDefaultNumbers(Date::INDIAN_NUMBERS);
```

---

There is some methods from `Carbon` class you can use it with `Date` class.

---

License
-------

[](#license)

This package is free software distributed under the terms of the MIT license.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~152 days

Total

13

Last Release

2585d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7a0b1f4cf1848dbea091cb11c8ef91388b3e5b62a041b6ee961772dafbaa9ad?d=identicon)[reloadlife](/maintainers/reloadlife)

---

Top Contributors

[![aboudeh87](https://avatars.githubusercontent.com/u/10183425?v=4)](https://github.com/aboudeh87 "aboudeh87 (39 commits)")[![atmonshi](https://avatars.githubusercontent.com/u/1952412?v=4)](https://github.com/atmonshi "atmonshi (1 commits)")

### Embed Badge

![Health badge](/badges/reloadlife-hijri/health.svg)

```
[![Health](https://phpackages.com/badges/reloadlife-hijri/health.svg)](https://phpackages.com/packages/reloadlife-hijri)
```

###  Alternatives

[ashallendesign/short-url

A Laravel package for creating shortened URLs for your web apps.

1.4k1.9M4](/packages/ashallendesign-short-url)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[intervention/zodiac

Zodiac Sign Calculator

58191.7k](/packages/intervention-zodiac)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[solspace/craft-calendar

The most powerful event management and calendaring plugin!

1830.8k1](/packages/solspace-craft-calendar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
