hijri
hijri copied to clipboard
Bug: wrong conversion gre2hijri OR hijri2gre
While Greogian date is Fri, 01 Sep 2017
, Hijri date must be @day=10, @month=12, @year=1438
(ie. Dhul-Hijjah 10, 1438 Al-Jum'ah (Friday) [1]) but Hijri date calculated wrongly @day=8, @month=12, @year=1438
.
> date = Date.civil(2017, 9, 1)
=> Fri, 01 Sep 2017
> date.to_hijri
=> #<Hijri::Date:0x0055e6876525e8 @day=8, @month=12, @year=1438>
I found a possible solution at [1] and filter associated codes as Javascript [4].
References:
- http://www.islamicity.org/hijri-gregorian-converter/
- http://www.islamweb.net/emainpage/index.php?page=dateconverter
- http://www2.diyanet.gov.tr/DinHizmetleriGenelMudurlugu/Sayfalar/2017DiniG%C3%BCnlerListesi.aspx
- https://gist.github.com/seyyah/ebe7c309d9a9a2baf4739b6c1faf4e21
Hello @seyyah
Sorry I've been out this month and thank you for the issue.
This is true, there is an error ratio for converting between Hijri and Georgian. I'll check your links and try to minimize the converting error.
Hey Aziz, I'm trying to learn Ruby. If you don't mind, I'll play with this issue and see if I can fix it.
Hey Saleh,
Please do :) and contact me if you need any help with that.
Hey just as an update, I banged my head against this multiple times and couldn't really make any progress. I'm giving up :(