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

[bug] week_of_month is incorrect #438

Closed
dindom999 opened this issue Jan 21, 2020 · 1 comment · Fixed by #774
Closed

[bug] week_of_month is incorrect #438

dindom999 opened this issue Jan 21, 2020 · 1 comment · Fixed by #774

Comments

@dindom999
Copy link

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

@mattsemradlba
Copy link

I think bug in week_of_month for last month of year (Dec)

If in December then week_of_month is returning the week_of_year (i.e., 48, 49, 50, 51, 52).

It appears to work for all other months.

@chrimaho chrimaho mentioned this issue Jun 19, 2021
sdispater added a commit that referenced this issue Dec 14, 2023
sdispater added a commit that referenced this issue Dec 15, 2023
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

Successfully merging a pull request may close this issue.

2 participants