Files
ISSSTELEON/Core/core/follow_up.py
T
alberto 781e1ea75a C1a: code only, no comments, no Markdown
The four Markdown files (README.md, tests/fixtures/ados2_items_by_module.md, tools/delivery/README.md, tools/delivery/README.repo.md) live in the outer repo under docs/ISSSTELEON; the delivery scripts no longer produce a README and the ADOS-2 expected values stay in the Python test.
2026-12-01 16:56:14 -06:00

10 lines
329 B
Python

import calendar
from datetime import date
def window_start(cutoff: date, months: int) -> date:
total = cutoff.year * 12 + cutoff.month - 1 - months
year, month = divmod(total, 12)
day = min(cutoff.day, calendar.monthrange(year, month + 1)[1])
return date.fromordinal(date(year, month + 1, day).toordinal() + 1)