fingerpich/jalali-moment

add function not worked properly

omidgharib opened this issue · 2 comments

add functionlity
moment(monthEnd).add(1, "jMonth")
Expected behavior
I expected that line of code give me the end date of next month
PS: monthEnd is end date of the current month
i have to change it to moment(monthEnd).subtract(1, "jMonth").endOf("jMonth") to be worked.

برای مثال وقتی monthEnd آخر ماه اسفند 1399 هستش و یک ماه به ان اضافه می کنید میشه 29 فروزدین 1400 (در صورتی که بهتر هست بشود 31 فروردین)

so moment(monthMiddle).add(1, 'month') should be the middle of next month?
Does the moment.js doing what you expect?