samanzamani / PersianDate

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

AddMonth Issue #62

Closed SudoDios closed 2 years ago

SudoDios commented 2 years ago

Hi Again. I using for loop to increase month and get data.

for (i in 1..12) {
     persianDate.addMonth(1)
     val month = persianDate.shMonth
     val year = persianDate.shYear
     Log.e("out","$month - $year")
}

But not get month 7 (mehr). and get duplicate month 6 (shahrivar) Log :

2022-01-15 12:36:51.708 E/out: 11 - 1400
2022-01-15 12:36:51.709 E/out: 12 - 1400
2022-01-15 12:36:51.710 E/out: 1 - 1401
2022-01-15 12:36:51.711 E/out: 2 - 1401
2022-01-15 12:36:51.713 E/out: 3 - 1401
2022-01-15 12:36:51.714 E/out: 4 - 1401
2022-01-15 12:36:51.715 E/out: 5 - 1401
2022-01-15 12:36:51.717 E/out: 6 - 1401
2022-01-15 12:36:51.718 E/out: 6 - 1401
2022-01-15 12:36:51.719 E/out: 8 - 1401
2022-01-15 12:36:51.720 E/out: 9 - 1401
2022-01-15 12:36:51.722 E/out: 10 - 1401
samanzamani commented 2 years ago

Hi @SudoDios Thank you for your report. I will test.

mahramane commented 2 years ago

سلام آقای زمانی قرار شد یه تابعی مثل addMonth درست کنی ولی این تابع یک ماه رو کم کنه چی شد؟

samanzamani commented 2 years ago

سلام @mahramane از نظر کاری تایم آزاد پیدا نکردم سعی می کنم به زودی اپدیت جدیدی ارائه کنم

samanzamani commented 2 years ago

Bug fixed in v1.4.0

samanzamani commented 2 years ago

@mahramane متدهای گرفتن سال، ماه، روز، قبل هم اضافه شد. توضیحات بیشتر در زیر: https://github.com/samanzamani/PersianDate/issues/43