dralshehri / hijridate

Accurate Hijri-Gregorian dates converter based on Umm al-Qura calendar
https://hijridate.readthedocs.io
MIT License
67 stars 14 forks source link

to_hijri() not returning accurate results or am i doing someting wrong? #8

Closed impubes closed 3 years ago

impubes commented 3 years ago

Hi, Thank you for this great library. It is really integrating well with python datetime but sometimes i cannot get accurate results. For example; Gregorian(1976, 09, 25).to_hijri() giving me following result Hijri(1396, 10, 2) But this day should be the beginning of Shawwal not the second day of this month. Another example is Gregorian(2016, 7, 5).to_hijri() is returning Hijri(1437, 9, 30), but it is beginning of Shawwal (10) as well. Thank you

dralshehri commented 3 years ago

Hi @impubes,

I appreciate your feedback.

Can I know the source you used to check those dates?

impubes commented 3 years ago

For example following converters https://www.islamicity.org/hijri-gregorian-converter/?gclid=Cj0KCQjw-NaJBhDsARIsAAja6dNkrzglNZfB1TOTGowT8YPXSm0yYd93LyJOKk0t7oW4zjRLxdZyZqoaAiHJEALw_wcB&AspxAutoDetectCookieSupport=1# https://www.islamicfinder.org/islamic-date-converter/ And as well as official site of Turkish Presidency of Religious Affairs (unfortunately no English language) https://vakithesaplama.diyanet.gov.tr/dini_gunler.php As important religious days are official holiday here in my country i am trying to implement this kind of automatic solution to date calculator instead if writing these days to json file one by one :) But it looks like maybe there is some differences from country to country Greetings.

dralshehri commented 3 years ago

The converter is currently based on the Umm al-Qura calendar which has its own calculation rules and might be different from other Hijri calendar systems used in some countries.

However, I’m working on implementing other common calendars including Turkey calendar.

So, I’ll close this issue for now and l’ll come back to you once it’s done.

Thanks again for your valuable feedback.