Define next birthday based on date of birth

Hi there,

I have a table with birth dates in it. I found a tutorial on the Xano site to calculate age. But I also want to calculate next birth day, taking leap year and already past birth days into account. Has anyone a sort of best practice for this? My approach would be.

  • Replace year of birth date with current year

  • If that date is greater than current date, add 1 year

  • If calculated birth date is month 2 and day 29, check with a modulo filter of it is a leap year. If so, set the date to the first day of March.

Thanks in advance for you insights.

1
1 reply