Gregorian Date to Hijiri Date and Hijiri Date to Gregorian Date

Hi All,

The good news for us in the Islamic world is that Java SE 8 includes support for Hijri Calendar (Umm Alqurra) by default. Date conversions from and to Hirji couldn’t be just easier.

I hope this should be useful to someone who wants to convert Gregorian calendar to Hijiri calendar or Hijiri calendar to Gregorian calendar.

This is coded on Java 8 and it will work like a charm without any external jars like JODA or custom built jars

Please find the attached utility to convert Gregorian calendar to Hijiri calendar and vice versa. For more detials and understand refer https://en.wikipedia.org/wiki/Gregorian_calendar or https://en.wikipedia.org/wiki/Islamic_calendar

You can also refer the link http://www.islamicfinder.org/dateConversion.php to Gregorian-Hijri Dates Converter

Let me know if you have any questions or suggestion on this.
HijriCalendarUtils.zip (10.7 KB)

You can also refer the link http://www.islamicfinder.org/dateConversion.php to Gregorian-Hijri Dates Converter. *There is a small probability of one day error.

Updated the code to remove “small probability of one day error”. For test use the below link:

http://www.islamicity.com/PrayerTimes/hijriconverter1aPartner.htm