This is how I'm calculating the age of a person via moment:
const age = moment().diff('1980-01-01', 'years', false)
But as I also need to get the current age of children and babies, I need to get the output like these four examples:
30 years // adults
1 year 2 months // for all <18 years
2 months 12 days // for all <1 year and > 1 month
20 days // for all <1 month
How do I calculate those outputs?