Search code examples
pythondatehijri

Convert Hijri (Islamic Date) to Gregorian


I was working on a group project when we came to need Islamic date in Python. I found an extension of Ummalqurra but it does not work on Python 3.7.4, I would like help in this regard from the community to make a complete resource for Hijri Date in Python.

I thought of converting some Java libraries to Python but how??? By all accounts this needs to be done so if anyone has an algorithm to it please show us or a pre-existing library that I have missed in this regard.

'The other related article on Stackoverflow is on that of Iranian Solar Calander while I want the Islamic Hijri Calander.'


Solution

  • hijri-converter has been deprecated and will not receive future updates. Please use the hijridate package instead.

    If you are using the Anaconda distribution, use conda install -c conda-forge hijridate, otherwise use pip install hijridate, as per GitHub: HijriDate


    Have a look at the hijri-converter package, which helps in converting between Hijri and Gregorian dates using the Umm al-Qura calendar.