obsidian-dataview
obsidian-dataview copied to clipboard
there is not a default value for "created" of the object "task" when using func ".where(t => t.created > recentDate)" to filter recent tasks.
What happened?
there used to be a default value for "task.created" (by the page.cday), but now there isn't such a default value and i don't know how to fix it. Or is there anyway to filter recent tasks such as within a week or a month?
DQL
const current = new Date(); const recent = new Date(); recent.setDate(recent.getDate() - 15);
const groups = dv.pages() .file .tasks .where(t => recent <= t.created && t.created < current) .sort(t => t.created, "desc");
dv.taskList(groups)
JS
No response
Dataview Version
0.5.41
Obsidian Version
0.15.9
OS
Windows
You can use file.cday
or file.mday
directly before going down into the tasks
array.