fingerpich / jalali-moment

Display, parse, manipulate, validate and convert jalali (Persian, Khorshidi, Shamsi) or Gregorian (Miladi) dates and times.
https://fingerpich.github.io/jalali-moment/
MIT License
433 stars 68 forks source link

add function not worked properly #124

Open omidgharib opened 2 years ago

omidgharib commented 2 years ago

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 commented 2 years ago

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

fingerpich commented 2 years ago

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