Skip to content

moment.jDaysInMonth bug #243

Description

@alivtar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions