samanzamani / PersianDate

Persian date for android
BSD 3-Clause "New" or "Revised" License
326 stars 40 forks source link

Throw Exception for 1408, 1412, 1416, etc #35

Closed fardinfrd closed 3 years ago

fardinfrd commented 3 years ago

Hi developers I have problem with this code:

PersianDate persianDate = new PersianDate();
persianDate.setShYear(1408);
persianDate.setShMonth(1);
persianDate.setShDay(1);

//some lines of code

new PersianDate(persianDate.getTime());

Upper code throws exception: Method threw 'java.lang.ArrayIndexOutOfBoundsException' exception. java.lang.ArrayIndexOutOfBoundsException: length=13; index=-1

I use version 0.8.

thanks

samanzamani commented 3 years ago

Hi @fardinfrd Thank you for the report I will check this

samanzamani commented 3 years ago

Bug fixed in v1.0