You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 return30
But in fact, it returns 29!Or
moment.jDaysInMonth(1400, 12)
is expected to return29
(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
The text was updated successfully, but these errors were encountered: