No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore attribute/month_len Oct 17, 2015

Python Hijri Umalqurra


Python Umalqurra Calender is an API that will give you the ability to convert Gregorian to Hijri and hijri to Gregorian it will give you the day name in arabic and english , and the month name in Hijri arabic and Gregorian.


You can install the library through pip

pip install umalqurra


you can run the code in the python interpreter to see the result

from umalqurra.hijri_date import HijriDate
#create the object with Gregorian date 
um = HijriDate(1989,1,10,gr=True)
#to see the day in Hijri # result : 3.0
#to see the month in Hijri
um.month #result is 6.0
um.year #1409
#day name in arabic
print um.day_name #الثلاثاء
#day in english
um.day_name_en #Tuesday
#month in Hijri Arabic
print um.month_name #جمادي الاخرة
#month in Gregorian English
um.month_name_gr #January
#year in Gregorian
um.year_gr #1989
#month in Gregorian
um.month_gr # 1
#day in Gregorian
um.day_gr # 10

if you want to convert from Hijri to Gregorian just change the parameter in the constructor and don't pass flag 'gr'

#create the object with Hijri date 
um = HijriDate(1436,3,15)

if you want to set the Hijri date from method not constructor

um = HijriDate()

if you want to set the Gregorian date from method not constructor

um = HijriDate()

if you want the current day

um =


The Hijri algorthem code has been transulate from javascript to python. The java script was developed by Suhail Alkowaileet also I use this code for more understanding