skillfed

hijridate

Accurate Hijri-Gregorian dates converter based on Umm al-Qura calendar

hijridate v2.6.0 3.1M downloads/30d#2,769 on PyPI87
Permissive license MIT Active released

What it is and what it does

HijriDate is a Python library for converting dates between the Hijri Islamic calendar and the Gregorian calendar. It uses the Umm al-Qura calendar standard, which is the official calendar of Saudi Arabia and is based on astronomical calculations rather than lunar crescent sighting. The package supports dates from 1343 AH (1 August 1924 CE) to 1500 AH (16 November 2077 CE), corresponding to the period covered by official calendar sources.

The library provides bidirectional conversion: you can convert a Hijri date to Gregorian and vice versa. It includes comprehensive input validation, error handling, multilingual support for Arabic, English, Bengali, and Turkish, and rich comparison and formatting options. The package has zero runtime dependencies, full type annotations, and 100% test coverage, making it straightforward to integrate into applications that need accurate Islamic calendar handling.

Use it for:

  • Convert Hijri dates from Islamic documents, contracts, or historical records to Gregorian dates for international use.
  • Generate Hijri dates for Islamic event scheduling, prayer time calculations, or Ramadan planning applications.
  • Validate and normalize dates in systems serving users in Saudi Arabia or other regions using the Umm al-Qura calendar.
  • Build multilingual calendar applications that display both Hijri and Gregorian dates to users in Arabic-speaking regions.
  • Integrate date conversion into healthcare, legal, or government systems that must handle both calendar systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts dates between the Hijri (Islamic) and Gregorian calendars using the Umm al-Qura standard, with support for dates from 1343 AH to 1500 AH.

Yes. The package is actively maintained, has zero dependencies, supports modern Python versions (3.10–3.14), carries no known vulnerabilities, and is licensed permissively under MIT. Install it if you need reliable Hijri-Gregorian conversion within the supported date range; the main constraint is the 1343–1500 AH window and the explicit non-suitability for religious crescent-sighting contexts.

Install

hijridate on PyPI

pip

pip install hijridate

uv

uv add hijridate

poetry

poetry add hijridate

Installing hijridate

Before you install

Low friction: pure Python wheel with zero runtime dependencies and active maintenance. Last release 220 days ago, repository actively maintained with recent commits.

License in practice

MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal attribution requirements.

Quickstart

pip install hijridate

from hijridate import Hijri, Gregorian

# Convert Hijri to Gregorian
hijri = Hijri(1445, 6, 15)
gregorian = hijri.to_gregorian()
print(gregorian)  # 2023-12-28

# Convert Gregorian to Hijri
gregorian = Gregorian(2023, 12, 28)
hijri = gregorian.to_hijri()
print(hijri)  # 1445-06-15

Requires Python 3.10 or later; dates outside the range 1343 AH to 1500 AH are not supported.

Verify before relying

  • Accuracy verification against sources beyond Umm al-Qura; whether religious/crescent-sighting use cases are supported despite the stated limitation.
  • Performance characteristics and whether the package is suitable for high-volume batch conversions.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 220 days since the last release
Last repo commit
First released
Downloads 3,064,675/month — #2,769 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hijridate-2.6.0-py3-none-any.whl

Keywords: calendar, conversion, converter, date, gregorian, hijri, saudi, ummalqura, ummulqura

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Healthcare IndustryIntended Audience :: Legal IndustryIntended Audience :: Science/ResearchNatural Language :: ArabicNatural Language :: BengaliNatural Language :: EnglishNatural Language :: TurkishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Software Development :: InternationalizationTopic :: Software Development :: LocalizationTopic :: UtilitiesTyping :: Typed

Tags

hijri gregorian date conversionislamic calendar converterumm al-qura calendarhijri date libraryislamic date pythongregorian to hijricalendar conversion tool
calendar-conversioninternationalizationislamic-calendar

More Scientific/Engineering packages