jalali-moment icon indicating copy to clipboard operation
jalali-moment copied to clipboard

add function not worked properly

Open omidgharib opened this issue 2 years ago • 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.

omidgharib avatar Apr 18 '22 19:04 omidgharib

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

omidgharib avatar Apr 18 '22 19:04 omidgharib

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

fingerpich avatar Apr 18 '22 20:04 fingerpich