How to get age from input date of birth

How would I calculate a person's age (at end of calendar year) based on form-inputted date of birth?

Thank you.

If you just needed the age in years, you could do something like:

Year of birth: {formtext: name=born; default=1980}
Age at end of the current year: {={time: YYYY} - born}

Is that what you were looking for?

Perfect, thanks.