Calculate age(YY MM DD) in Apperyio app

Problem:

You might want to show a person’s age in “YY MM DD” format in your Apperyio application.

Solution:

Use small snippet below. Javascript has no powerful tool when it comes to dates and Date object in particular. I used momentjs library in my code. Make sure you have included it in your Apperyio project.

 

// OR simpler solution #2

Leave a Reply

Your email address will not be published. Required fields are marked *