items-by-period #2

Merged
aetos merged 7 commits from items-by-period into main 2026-05-09 13:00:43 +00:00
Showing only changes of commit 4c8552051c - Show all commits

View File

@@ -73,14 +73,11 @@ function buildLabel(
end: Date
): string {
switch (type) {
case "weekly":
if (sameMonth(start, end)) {
case "weekly": {
const sDay = start.getUTCDate();
const eDay = end.getUTCDate();
const m = monthFmt.format(start);
return `${sDay} ${m} - ${eDay} ${m}`;
return `${sDay} ${m}`;
}
return `${dayFmt.format(start)} - ${dayFmt.format(end)}`;
case "monthly":
return `${monthFmt.format(start)} ${yearFmt.format(start)}`;