{"id":2530,"library":"hijri-converter","title":"hijri-converter","description":"hijri-converter is a Python package designed for accurate conversions between Hijri (Islamic) and Gregorian dates, primarily based on the Umm al-Qura calendar. While it provided robust date conversion features, it is now deprecated in favor of the `hijridate` package. The current version is 2.3.2.post1, and it is no longer actively maintained, with future development and support continuing under `hijridate`.","status":"deprecated","version":"2.3.2.post1","language":"en","source_language":"en","source_url":"https://github.com/dralshehri/hijridate","tags":["date","calendar","hijri","gregorian","islamic","conversion"],"install":[{"cmd":"pip install hijri-converter","lang":"bash","label":"Install `hijri-converter` (deprecated)"},{"cmd":"pip install hijridate","lang":"bash","label":"Install `hijridate` (recommended successor)"}],"dependencies":[{"reason":"Required runtime environment.","package":"Python","optional":false}],"imports":[{"note":"This is the correct import for the deprecated 'hijri-converter' package. For new projects, use 'from hijridate import Hijri, Gregorian' as the API is identical but the package name differs.","wrong":"from hijridate import Hijri, Gregorian","symbol":"Hijri, Gregorian","correct":"from hijri_converter import Hijri, Gregorian"}],"quickstart":{"code":"from hijri_converter import Hijri, Gregorian\n\n# Convert a Hijri date to Gregorian\nh_date = Hijri(1403, 2, 17)\ng_date = h_date.to_gregorian()\nprint(f\"Hijri 1403-02-17 is Gregorian: {g_date}\")\n\n# Convert a Gregorian date to Hijri\ng_date_input = Gregorian(1982, 12, 2)\nh_date_output = g_date_input.to_hijri()\nprint(f\"Gregorian 1982-12-02 is Hijri: {h_date_output}\")","lang":"python","description":"This example demonstrates how to convert dates between Hijri and Gregorian calendars using the `Hijri` and `Gregorian` classes. Both date systems allow conversion to the other."},"warnings":[{"fix":"Uninstall `hijri-converter` and install `hijridate`. The API remains identical, so import statements need to change from `from hijri_converter import ...` to `from hijridate import ...`.","message":"The `hijri-converter` package is officially deprecated and will not receive any further updates. Users are strongly advised to migrate to the `hijridate` package.","severity":"breaking","affected_versions":"All versions (from 2.3.2.post1 onwards)"},{"fix":"Ensure input dates fall within the supported range. For dates outside this range, alternative conversion methods or libraries may be required.","message":"The converter has a limited date range, supporting dates from 1343 AH to 1500 AH (approximately August 1, 1924 CE to November 16, 2077 CE). Dates outside this range may not be converted accurately or may raise errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For religious observances, always consult local religious authorities or confirmed moon sighting announcements rather than relying solely on programmatic conversion.","message":"The conversion is based on astronomical calculations for the Umm al-Qura calendar and is not intended for religious purposes where the sighting of the lunar crescent is preferred for determining the start of Hijri months. Local moon sighting can cause a one-day difference.","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"}