feat: Szenario-Einträge je Stichtag mit Zeitraum und Art Neuer Betrag (A14-T2)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-30 13:00:18 +02:00
co-authored by Claude Opus 5.5
parent b0a1ba80a1
commit aaf05b9209
7 changed files with 144 additions and 25 deletions
+6
View File
@@ -8,6 +8,12 @@ def _clamp(y: int, m: int, day: int) -> date:
return date(y, m, min(day, calendar.monthrange(y, m)[1]))
def due_in_month(month: date, due_day: int) -> date:
"""Fälligkeitstag `due_day` im Monat von `month`, auf die Monatslänge
geklemmt (gleiche Regel wie occurrences)."""
return _clamp(month.year, month.month, due_day)
def occurrences(rhythm: str, due_day: int, window_start: date, window_end: date,
item_start: date | None = None, item_end: date | None = None) -> list[date]:
step = STEP[rhythm]