Where will you be using this query? In each of the daily notes, or just the weekly review or something similar?
Multiple options are available related to how not to hardcode the dates within the query.
Use a frontmatter field
You could declare the wanted dates within the frontmatter:
TABLE without ID file.link AS Date, file.lists.text AS Highlights
WHERE file.day >= date(this.weekStart)
AND file.day <= date(this.weekEnd)
If you’re using Templater you can rather easily find the start and/or end of week when you create your daily/weekly notes.
The same can be done within the Dataview query, where one way of doing it would be to use duration calculation related to your current date. The following example should show the way of doing this:
TABLE WITHOUT ID D, D.weekday,
(D - dur(D.weekday + " day")),
(D - dur((D.weekday - 6) + " day"))
"2023-04-18" ) as testDate
FLATTEN date(testDate) as D
WHERE file.path = this.file.path
Which produce this output:
In the output you’ll see that it can correctly subtract days across month, and get you the correct week start and ends
So if you do
(file.day - dur(file.day.weekday + " day")) given that you’re either using filenames or fields defining the date, you should get the start of that week. For the end of the week (since we’re basically subtracting to start with):
(file.day - dur((file.day.weekday - 6) + " day")).
Note that using
date(sow) & co, will always refer to the current date (if I’m not mistaken). So whilst they are valid in the current weekly note, if you open that note in a few weeks, or you go back to a weekly note in the past, it’ll still use current date to calculate start and end of week. In many cases that is not what you intend for them to do.