diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-07-14 18:28:50 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-07-16 02:44:02 +0000 |
| commit | 0f3361550c7056fe0fdce682ba9b971d56c0941d (patch) | |
| tree | b07cb48a616a0ff67dee665cc5e4888291c281fa | |
| parent | 9a7f19270c50def47be5dc1a9b30d8655d7098c9 (diff) | |
docs: clarify monthly rollover drift is permanent, and only affects day 29-31 anchors
| -rw-r--r-- | docs/superpowers/specs/2026-07-14-task-recurrence-and-detail-editing-design.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/superpowers/specs/2026-07-14-task-recurrence-and-detail-editing-design.md b/docs/superpowers/specs/2026-07-14-task-recurrence-and-detail-editing-design.md index 2cb6098..174e970 100644 --- a/docs/superpowers/specs/2026-07-14-task-recurrence-and-detail-editing-design.md +++ b/docs/superpowers/specs/2026-07-14-task-recurrence-and-detail-editing-design.md @@ -92,7 +92,7 @@ func nextWeeklyOccurrence(due time.Time, interval int, weekdays []int) time.Time - `freq=weekly, interval=1, weekdays=[1,3,5]` (Mon/Wed/Fri), due=Mon → next=Wed (2 days later, same week). - Same pattern, due=Fri → next=Mon the following week (wraps: `daysToNextWeekStart=7-5=2`, `+sorted[0]=1` → 3 days later = next Monday). - `freq=weekly, interval=2, weekdays=[1]` (Mon only), due=Mon → next = Mon two weeks later (`daysToNextWeekStart=7-1=6`, `+1` (sorted[0]) `+7*(2-1)=7` → 14 days later). -- `freq=monthly, interval=1`, due=Jan 31 → next=Mar 3 (Go's standard `AddDate` month-overflow rollover; not clamped to end-of-month — accepted simplification, noted so it isn't mistaken for a bug later). +- `freq=monthly, interval=1`, due=Jan 31 → next=Mar 3 (Go's standard `AddDate` month-overflow rollover; not clamped to end-of-month — accepted simplification, noted so it isn't mistaken for a bug later). This drift is **permanent, not self-correcting**: each computation rebases on the previous row's *actual* due date, not an original anchor day, so Mar 3 → Apr 3 → May 3 → ... locks onto day-3 forever. Only anchor days 29–31 are affected at all (some month always lacks them); any day ≤ 28 recurs on the same day-of-month indefinitely with zero drift, since every month has at least 28 days. ## Iteration Creation |
