Calculates current age in full completed years.
Date of birth in any format parseDob accepts.
parseDob
Optional
Date to calculate the age on. Defaults to today.
Age in full years on the UTC calendar date, or null if the input is invalid.
null
calculateAge('2000-01-15', new Date('2026-01-01')); // 25 Copy
calculateAge('2000-01-15', new Date('2026-01-01')); // 25
Calculates current age in full completed years.