Wrong month calculation
Hello,
PersianDate().initJalaliDate(1404, 4, 1).addMonths(1) should return "1 mordad 1404" but returns "31 tir 1404" It seems a Java Calender mismatch issue with JalaliDate in addDate function.
Version: v.1.7.1
Hello, This happens because the addition and subtraction operations in the library are internally performed based on the Gregorian calendar, and then converted to the Jalali date. As a result, operations like addMonths(1) may not return the expected value in the Jalali calendar, especially for dates near the end of the month
@amirroid Thanks for additional notes. That's the exact issue I earlier mentioned. I need the fix for that but I don't know if this lib is still maintained by author or else I have to fix it myself.
@mohammadnr2817 I’m not sure if the library is still maintained by the author, but I’ve written a library for KMP before that doesn’t have this issue. You can check my repositories, there’s one called JalaliDate.
Thank you @amirroid. I'll look into it.