call_report.core.PeriodRange#
- class call_report.core.PeriodRange(*, start: str | date | ReportingPeriod, end: str | date | ReportingPeriod)[source]#
Bases:
Sequence[ReportingPeriod]An inclusive, contiguous sequence of quarterly ReportingPeriods.
Both start and end must always be supplied explicitly. There is no single-quarter default, so a range’s bounds are never ambiguous.
- Parameters:
- startstr, datetime.date, or ReportingPeriod
The first quarter-end in the range.
- endstr, datetime.date, or ReportingPeriod
The last quarter-end in the range (inclusive).
- Raises:
- InvalidPeriodError
If either bound is not a valid quarter-end date, or if end is before start.
Examples
>>> period_range = PeriodRange(start="2025-09-30", end="2026-03-31") >>> [period.label for period in period_range] ['2025Q3', '2025Q4', '2026Q1']