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 am on the latest Pendulum version. pendulum==3.0.0
I have searched the issues of this repo and believe that this is not a duplicate. There are no current open issues. The closest one I could find is one that was opened in 2020. Most of the issues with this property have to do with negative values; however this issue seems to be more about miscounting
OS version and name: MacOS Sequoia
Pendulum version: 3.0.0
Issue
Was playing around with the week_of_month property and found some interesting behavior:
I'm a bit confused by this behavior and believe it should be a bug because September 2024 should have the following week breakdowns:
Week 1: September 1st, Sunday -> September 8th Sunday
Week 2: September 8th, Sunday -> September 15th Sunday
Week 3: September 15th Sunday -> September 22nd Sunday
Week 4: September 22nd Sunday -> September 29th Sunday
Week 5: September 29th Sunday -> September 30th Monday (last date in September)
The text was updated successfully, but these errors were encountered:
I see, I wasn't considering the case where we define a starting day. I was strictly considering whatever day the 1st of the month is as the beginning of the "week counter." I guess it boils down to what the intended/expected behavior of this function is.
pendulum==3.0.0
There are no current open issues. The closest one I could find is one that was opened in 2020. Most of the issues with this property have to do with negative values; however this issue seems to be more about miscounting
Issue
Was playing around with the week_of_month property and found some interesting behavior:
The following:
Results in this output:
I'm a bit confused by this behavior and believe it should be a bug because September 2024 should have the following week breakdowns:
Week 1: September 1st, Sunday -> September 8th Sunday
Week 2: September 8th, Sunday -> September 15th Sunday
Week 3: September 15th Sunday -> September 22nd Sunday
Week 4: September 22nd Sunday -> September 29th Sunday
Week 5: September 29th Sunday -> September 30th Monday (last date in September)
The text was updated successfully, but these errors were encountered: