Hi folks. Noob here. I have been trying to filter out a list of tasks for a specific week. I have a daily note with a File name format 2023-11-01 Wed
where I have a list of tasks. I also have a weekly note with a file named Week 46
. This is a summary for that week.
In the Week X file, I would like to list all the incomplete tasks from daily notes only for that week. The problem is that all the weekly note does not filter out the task for that week. So, Week 48 and Week 23 have the same task.
This is the dataviewjs
code I am using.
const today = moment();
const from_date = today.startOf('week');
const to_date = today.endOf('week');
dv.header(2, '🚧 Task(s) Due This Week');
dv.taskList(dv.pages('#notes/daily').file.tasks
.where(t => !t.completed && t.text !== "" && !t.text.includes("<% tp.file.cursor() %>")&& (t.dueDate == null || !moment(t.dueDate).isBetween(from_date, to_date, null, '[]')))
);
I hope someone can save me.