From 5c09a8716dc10ee959755aeedc20d2c37cff3f0e Mon Sep 17 00:00:00 2001 From: Jamie Brynes Date: Fri, 19 Dec 2025 17:12:52 +0000 Subject: [PATCH 1/2] plugin: make grouping granular at the day level --- .../src/data/transformations/grouping.test.ts | 24 +++++++++++++++++++ plugin/src/data/transformations/grouping.ts | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/plugin/src/data/transformations/grouping.test.ts b/plugin/src/data/transformations/grouping.test.ts index fd00c8b1..0a24b1fd 100644 --- a/plugin/src/data/transformations/grouping.test.ts +++ b/plugin/src/data/transformations/grouping.test.ts @@ -465,6 +465,30 @@ describe("group by date", () => { }, ], }, + { + description: "should group tasks on same due date but different times together", + input: [ + makeTask("a", { + due: makeDueDate("2024-01-12"), + }), + makeTask("b", { + due: makeDueDate("2024-01-12T09:00:00"), + }), + ], + expected: [ + { + header: "Jan 12 ‧ Friday", + tasks: [ + makeTask("a", { + due: makeDueDate("2024-01-12"), + }), + makeTask("b", { + due: makeDueDate("2024-01-12T09:00:00"), + }), + ], + }, + ], + }, ]; for (const tc of testcases) { diff --git a/plugin/src/data/transformations/grouping.ts b/plugin/src/data/transformations/grouping.ts index 3403f6fb..24201773 100644 --- a/plugin/src/data/transformations/grouping.ts +++ b/plugin/src/data/transformations/grouping.ts @@ -154,7 +154,8 @@ function groupByDate(tasks: Task[]): GroupedTasks[] { return "Overdue"; } - return task.due.date; + // Discard any time component for grouping purposes + return task.due.date.split("T")[0]; }); const groups = Array.from(dates.entries()); groups.sort((a, b) => { From 3d48a69fc716ce2cce6d9d09781f69d1496f6659 Mon Sep 17 00:00:00 2001 From: Jamie Brynes Date: Fri, 19 Dec 2025 17:13:07 +0000 Subject: [PATCH 2/2] docs: add changelog --- docs/docs/changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/changelog.md b/docs/docs/changelog.md index c97f28cd..21313b96 100644 --- a/docs/docs/changelog.md +++ b/docs/docs/changelog.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - You can now provide 'time' to the show field on a query. This will only render the time of the task (unless the end of the task is on a different day than the start). +### 🐛 Bug Fixes + +- Date grouping now correctly groups tasks on the same day together regardless of whether they have times + ## v2.3.0 (2025-12-06) ### ✨ Features