Skip to content

Fixed monthly recurring tasks off by one#15599

Open
Tanmay-Nalawade wants to merge 1 commit intoHabitRPG:developfrom
Tanmay-Nalawade:fix/15496-dailies-monthly-repeat
Open

Fixed monthly recurring tasks off by one#15599
Tanmay-Nalawade wants to merge 1 commit intoHabitRPG:developfrom
Tanmay-Nalawade:fix/15496-dailies-monthly-repeat

Conversation

@Tanmay-Nalawade
Copy link
Contributor

[//]: Fixes #15496

Changes

  • Original code assumed months start on the 1st and are occurring at 7-day blocks, causing weekday calculations to sometimes shift dates.
  • Removed weekday calculation depending on the current week.
  • Now it calculates the nth weekday of the month by anchoring to the start of the month hence removing additional logic checks.
  • Added a max iteration limit of 48 (4 years) to prevent a potential infinite loop in edge cases.

UUID: 5b329964-b265-447b-b5a4-628fe7863fae

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 this pull request may close these issues.

Dailies set to repeat monthly on X day of week show as due the day after completion

1 participant