Closed Sepehr79 closed 3 years ago
I am sorry my response is late,
Yes this issue happened because you are using the same DateConverter instance twice. First you used jalaliToGregorian and then gregorianToJalali.
A simple work-around is to create a new instance once you want to convert another date.
DateConverter dateConverter1 = new DateConverter();
LocalDate localDate = dateConverter1.jalaliToGregorian(1400,1,8);
DateConverter dateConverter2 = new DateConverter();
JalaliDate jalaliDate = dateConverter2.gregorianToJalali(2021,3,28);
I know it seems ridiculous, but currently I am out of time and I hope to fix this issue in the near future.