Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions plugin/src/data/transformations/grouping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion plugin/src/data/transformations/grouping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down