If I understand correctly, you’re talking about list items with outlinks like:
? Using the regex and luxon format holroy gave, you can just explicitly add durations to get the 7 days of week and do a contains check for each:
table rows.L.section as Heading, rows.L.text as Reference
from ""
flatten file.lists as L
where contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW"), "yyyy-MM-dd")) OR
contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW") + dur(1 day), "yyyy-MM-dd")) OR
contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW") + dur(2 day), "yyyy-MM-dd")) OR
contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW") + dur(3 day), "yyyy-MM-dd")) OR
contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW") + dur(4 day), "yyyy-MM-dd")) OR
contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW") + dur(5 day), "yyyy-MM-dd")) OR
contains(L.text, dateformat(date(regexreplace(this.file.name, "-[01][0-9]", ""), "kkkk-'W'WW") + dur(6 day), "yyyy-MM-dd"))
GROUP BY file.link as File
However, this isn’t checking for outlinks, it’s just checking for list items that contain the date at all. So having a list item with just “2024-02-05” would flag it as well. Also, this is going to do a check on every single list item across all your files, I would narrow it down to a folder or something otherwise that’s an extremely intensive operation.
Dataviewjs block with a for loop would definitely be cleaner (a “date > weekStart && date <weekEnd” check would be cleanest), but this should at least compile for you.