How to query block property with a date?

I have also been playing with this, and believe I came up with a way to show the past 7 days only, dynamically based on the today’s date and journal-day values. Unfortunately, the query does not seem to update automatically yet (see discussion on https://github.com/logseq/logseq/issues/9802 )

Here is my version of the advanced query:

#+BEGIN_QUERY
{:title "Tasks completed in last 7 days"
    :query [:find (pull ?b [*] )
         :in $ ?start ?end
         :where
              [?b :block/properties ?properties]
              [(get ?properties :completed) ?d]
              [?p :page/journal? true]
              [?p :page/journal-day ?dnum]
              [?p :page/original-name ?jn]
              [(>= ?dnum ?start)]
              [(<= ?dnum ?end)]
              [(contains? ?d ?jn)]
 ]
 :inputs [:-7d :today]
}
#+END_QUERY