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

moment.jDaysInMonth bug #243

Open
alivtar opened this issue Nov 14, 2022 · 1 comment
Open

moment.jDaysInMonth bug #243

alivtar opened this issue Nov 14, 2022 · 1 comment

Comments

@alivtar
Copy link

alivtar commented Nov 14, 2022

Hi, thanks for your effort on this package.

I was working with jDaysInMonth method and realized an odd behavior with some dates.

For example:
moment.jDaysInMonth(1400, 11) is expected to return 30 But in fact, it returns 29!
Or
moment.jDaysInMonth(1400, 12) is expected to return 29 (since it's not a leap year) But in fact, it returns 31!!!

By printing all results like below, it seems that the return value of jDaysInMonth is shifted 1 step backward.

1400/10/23 30
1400/11/24 29
1400/12/22 31
1401/01/24 31
1401/02/23 31
1401/03/23 31
1401/04/22 31
1401/05/22 31
1401/06/22 30
1401/07/21 30
1401/08/22 30
1401/09/22 30

@behrang
Copy link
Member

behrang commented Nov 14, 2022 via email

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