Dataview plugin snippet showcase

Has anyone here figured out how to calculate days remaining for an event? I’m trying to have days remaining for a person’s birthday in their respective note and have birthday: 1985-03-03 in my YAML.

I can do = (date(today) - this.birthday) to get the age or = (date(today) - this.birthday).years to get the age in years. I can’t seem to do a countdown till their birthday if it is later this year, or if it’s passed already, then next year.

What I’ve tried so far is to separate the month and date from the calculated full age and for the months I can just do a simple = 12-((date(today) - this.birthday)).months+" months" but how do I do the same for the days since I cannot be sure of the length of a month?