refactor(calendar): drop the unused projection horizon
CI / policy (push) Successful in 7s
CI / validate (push) Successful in 1m2s
CI / build (push) Successful in 1m27s
CI / policy (pull_request) Successful in 11s
CI / security (push) Successful in 1m12s
CI / validate (pull_request) Successful in 1m21s
CI / benchmark (push) Successful in 4m10s
CI / test (push) Successful in 4m19s
CI / security (pull_request) Successful in 1m3s
CI / test (pull_request) Successful in 3m23s
CI / images (push) Successful in 1m34s
CI / build (pull_request) Successful in 34s
CI / required (push) Successful in 3s
CI / benchmark (pull_request) Successful in 7m13s
CI / images (pull_request) Successful in 1m56s
CI / required (pull_request) Successful in 2s

No caller read CalendarProjection.horizon, and with fixed months it no
longer described the listed months.

Refs #276

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nessarandClaude Opus 5.5 committed 2026-10-17 11:36:19 +02:00
1 parent a472347a5e
commit cee67ce3df
3 files changed
+5 -8

No files matched your search

@@ -142,11 +142,7 @@ function projectionFor(
months.push({ monthIndex: cursor.getMonth(), year: cursor.getFullYear() });
cursor.setMonth(cursor.getMonth() + 1);
}
return {
horizon,
months,
selections: selectedDatesForPlan(value, includeHoliday),
};
return { months, selections: selectedDatesForPlan(value, includeHoliday) };
}
function selectedDatesForPlan(
+3 -1
View File
@@ -277,7 +277,9 @@ describe('CalendarService', () => {
typeof value === 'object' && value ? Object.freeze(value) : value,
);
const projection = service.project(frozen);
expect(projection.horizon.end).toBe('2024-04-04');
expect(projection.selections.dayTypes(new Date('2024-04-03T00:00:00'))).toContain(
DayType.RTT,
);
expect(frozen).toEqual(before);
});
});
+1 -2
View File
@@ -53,7 +53,6 @@ export function calendarProjectionHorizon(plan: CalendarPlan) {
}
export interface CalendarProjection {
horizon: { start: string; end: string };
months: { monthIndex: number; year: number }[];
selections: SelectedDates;
}
@@ -147,7 +146,7 @@ export class CalendarService {
),
);
}
return { horizon, months, selections: new SelectedDates(ranges) };
return { months, selections: new SelectedDates(ranges) };
}
getHolidays(startYear = this.dateCache.getCurrentYear(), lastYear = startYear + 1): Date[] {