From 0f3361550c7056fe0fdce682ba9b971d56c0941d Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Tue, 14 Jul 2026 18:28:50 +0000 Subject: docs: clarify monthly rollover drift is permanent, and only affects day 29-31 anchors --- .../specs/2026-07-14-task-recurrence-and-detail-editing-design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3