Hazel rule to match on the latest date

I have a hazel folder that I drop scanned medical bills into. I have some rules that have specific providers and my family members’ names in there, and pdfs pop out renamed like {yyyy-mm-dd} - Medical Expense - {Family Member Name} - {Provider Name} - UNSUBMITTED.

This works perfectly fine most of the time. HOWEVER, some of my bills have people’s dates of birth on them. If they are first on the bill, that is the date Hazel picks.

What I would like is a rule that detects the most recent date. Of all the dates on the document, select the one that is latest in time. Does anyone know any way to do that?