{"id":2531,"library":"hijridate","title":"HijriDate","description":"A Python package for accurate Hijri-Gregorian date conversion based on the Umm al-Qura calendar. It offers reliable date conversion, optimized performance, and multilingual support. The current version is 2.6.0 and it is actively maintained with a regular release cadence, including support for new Python versions.","status":"active","version":"2.6.0","language":"en","source_language":"en","source_url":"https://github.com/dralshehri/hijridate","tags":["date","calendar","hijri","gregorian","conversion","umm al-qura"],"install":[{"cmd":"pip install hijridate","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Runtime environment. Minimum Python 3.10 is required for version 2.6.0.","package":"python","optional":false}],"imports":[{"note":"The package was renamed from `hijri-converter` to `hijridate` in v2.3.0.","wrong":"from hijri_converter import Hijri","symbol":"Hijri","correct":"from hijridate import Hijri"},{"note":"The package was renamed from `hijri-converter` to `hijridate` in v2.3.0.","wrong":"from hijri_converter import Gregorian","symbol":"Gregorian","correct":"from hijridate import Gregorian"}],"quickstart":{"code":"from hijridate import Hijri, Gregorian\n\n# Convert a Hijri date to Gregorian\nhijri_date = Hijri(1445, 6, 15)\ngregorian_date = hijri_date.to_gregorian()\nprint(f\"Hijri {hijri_date} is Gregorian {gregorian_date}\")\n\n# Convert a Gregorian date to Hijri\ngregorian_date = Gregorian(2023, 12, 28)\nhijri_date_converted = gregorian_date.to_hijri()\nprint(f\"Gregorian {gregorian_date} is Hijri {hijri_date_converted}\")\n\n# Get today's Hijri date\ntoday_hijri = Hijri.today()\nprint(f\"Today's Hijri date: {today_hijri}\")","lang":"python","description":"Initialize `Hijri` or `Gregorian` objects and use their `to_gregorian()` or `to_hijri()` methods for conversion. The `Hijri.today()` class method provides the current Hijri date."},"warnings":[{"fix":"Update your `pip install` command to `pip install hijridate` and modify all import statements from `from hijri_converter import ...` to `from hijridate import ...`.","message":"The package was renamed from `hijri-converter` to `hijridate` in version 2.3.0.","severity":"breaking","affected_versions":">=2.3.0"},{"fix":"Upgrade your Python environment to 3.10 or newer for `hijridate` versions 2.6.0 and above. For earlier `hijridate` versions, ensure you meet their specific Python requirements (e.g., Python 3.8+ for v2.5.0).","message":"Support for Python 3.8 and 3.9 was dropped in `hijridate` v2.6.0. Python 3.7 support was dropped in v2.4.0, and Python 3.6 in v2.3.0.","severity":"breaking","affected_versions":">=2.3.0"},{"fix":"When instantiating `Hijri` or `Gregorian` objects (e.g., `Hijri(1445, 6, 15, validate=True)`) or calling `dmyformat()` (e.g., `date_obj.dmyformat(padding=False)`), use keyword arguments for these parameters instead of positional ones.","message":"The `validate` argument for `Hijri` and `Gregorian` object instantiation, and the `padding` argument for `dmyformat()` functions, became keyword-only arguments in v2.5.0.","severity":"breaking","affected_versions":">=2.5.0"},{"fix":"Replace calls to `date_obj.slashformat()` with `date_obj.dmyformat(separator='/')` to achieve the same formatting.","message":"The `slashformat()` method was removed from `Hijri` and `Gregorian` classes in v2.2.0.","severity":"breaking","affected_versions":">=2.2.0"},{"fix":"Users should be aware of the supported date range and the library's intended use. For dates outside this range or for religious sighting, alternative solutions may be required.","message":"The converter supports dates only within the range 1343 AH to 1500 AH (1 August 1924 CE to 16 November 2077 CE) due to limitations of the official Umm al-Qura calendar sources. It is also not intended for religious purposes where lunar crescent sighting is preferred over astronomical calculations.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-10T00:00:00.000Z","next_check":"2026-07-09T00:00:00.000Z"}