- To get the (assuming journal) page on which the query is written:
- Get its (lowercase) name by using
:inputs [ :query-page ]
- Pass it as a variable by using e.g.
:in $ ?journal-name
- Get the page (ID) from the name by using e.g.
[?j :block/name ?journal-name]
- Get its (lowercase) name by using
- To compare against the week of the found journal:
- Get the date (YYYYMMDD) of the journal by using e.g.
[?j :block/journal-day ?j-d]
- Calculate the
?weekBegin
and?weekEnd
of the week of?j-d
similarly to this post (which is for next week, i.e. easier).- Yeah, this step is overly complicated, it will take much effort.
- The comparison will look like this:
[(>= ?d ?weekBegin)] [(<= ?d ?weekEnd)]
- Get the date (YYYYMMDD) of the journal by using e.g.