msarhan / ummalqura-calendar

Implementation of java.util.Calendar for the Umm Al-Qura calendar system.
MIT License
154 stars 51 forks source link

Crash When Set Date To 1350! #14

Closed aelahmar closed 6 years ago

aelahmar commented 6 years ago

Calendar now = new UmmalquraCalendar(1350, UmmalquraCalendar.SHAABAN, 11);

arvi commented 6 years ago

Yep. I can confirm it crashes when date is less than or equal to 1350. I hope this can be fixed. It seems the ummalquraData in UmmalquraGregorianConverter has no assigned array index for those. I am not familiar with arabic calendar or how the author arrived with the ummalquradata array values.

aelahmar commented 6 years ago

Any update on this issue?

msarhan commented 6 years ago

The calculation is valid only for dates from 1356 AH (14 March 1937 CE) to 1500 AH (16 November 2077 CE). I've add this check to the library, and mentioned it in the README file