Help with date comparisons in DataviewJS

Date comparisons is a hassle, and can be very confusing since DQL and Dataviewjs uses different date time libraries, and in addition you can call on e or the other from javascript. And they differ in how they compare against each other. In general doing “some date” == “another date” will fail.

Here is a simple(?) example:

aDate:: 2025-05-17

```dataviewjs
const aDate = dv.current().aDate
dv.paragraph(aDate, typeof aDate)
console.log("aDate: ", aDate)

const dvDate = dv.date("2025-05-17")
dv.paragraph(dvDate, typeof dv.current().aDate)
console.log("dvDate: ", dvDate)
dv.paragraph("Using equal signs: " + (aDate == dvDate).toString())
dv.paragraph("Using .equals(): " +  aDate.equals(dvDate).toString())
```

Some more on this topic:

So in your case, you should be able to do .where(p => p.date.equals(dv.date("2025-06-12"))