Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add function not worked properly #124

Open
omidgharib opened this issue Apr 18, 2022 · 2 comments
Open

add function not worked properly #124

omidgharib opened this issue Apr 18, 2022 · 2 comments

Comments

@omidgharib
Copy link

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
Copy link
Author

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

@fingerpich
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants