Recurrence: MONTHLY/YEARLY silently skip short months / non-leap years (month-end policy) #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When BYMONTHDAY is absent, the target day defaults to
anchor.day()(src/core/recurrence.rs:240,274).NaiveDate::from_ymd_optreturns None for invalid days and the loop just advances, skipping that month/year entirely.Consequences:
FREQ=MONTHLY→ next after Jan 31 is Mar 31 (February skipped), not Feb 28.FREQ=YEARLY→ next is Feb 29 2028 (2025-27 skipped).This is inconsistent with
apply_snapDayOfMonth, which clamps to month-end (recurrence.rs:63-67).Decision needed (spec): clamp the target day to the last day of the month (recommended — conventional "monthly on the 31st" = month-end, and consistent with the snap behavior) vs. the current skip. REQUIREMENTS §7 should state the chosen policy. Then implement + test the Jan 31 and Feb 29 cases.
Found in review.