Below I finally managed to finish a Birthday query. Maybe someone will find it useful. I have it in my default-queries and it shows a birthday if the property “birthday:: [[2000/01/31]]” is filled with today’s day.
If someone can make it easier, shorter, more readable please let me know
{:title "🎂 Birthday"
:query [:find (pull ?b [*])
:in $ ?today
:where
[?b :block/properties-text-values ?props]
[(get ?props :birthday) ?birthday]
[(str ?birthday) ?birthdayString]
[(subs ?birthdayString 7 9) ?month]
[(subs ?birthdayString 10 12) ?day]
[(str ?today) ?td]
[(subs ?td 4 6) ?todayMonth]
[(subs ?td 6 8) ?todayDay]
[(= ?month ?todayMonth)]
[(= ?day ?todayDay)]
]
:inputs [:today]
:collapsed? false}