Skip to content

[bug] week_of_month is incorrect #438

@dindom999

Description

@dindom999
In [1]: import pendulum

In [2]: pendulum.parse("2020-01-01").week_of_month
Out[2]: 1

In [3]: pendulum.parse("2020-01-07").week_of_month
Out[3]: 1  ==>should be 2

In [4]: pendulum.parse("2020-01-14").week_of_month
Out[4]: 2 ==>should be 3

I checked the source code, found the reason, and will pull a request to fix it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions