arabeyes-org / ITL

Islamic Tools and Libraries
Other
81 stars 21 forks source link

The clarification of the difference between G2H and and h_date (Documentation) #50

Open sam-ka opened 3 years ago

sam-ka commented 3 years ago

Hello everyone.

I'm trying to use ITL to convert Gregorian dates to their Hijri counterparts. Looking at hijri.h, the header defines two different functions that seem to do what I want. Perplexingly though, these two functions yield different results: Running demo_hijri.c on my system gives 23/8 for h_date and 24/8 for G2H.

What is the difference between these two functions? and which of these two functions should application developers use to convert Gregorian dates?

hijri.h should probably include a description of these differences as well.

aelmahmoudy commented 1 year ago

h_date, g_date defined in hijri.c, according to code comments in hijri.c:

H2G,G2H defined in umm_alqura.c, according to code comments in umm_alqura.c: