Display results with special format date display

I need help. I want to display a result like:
A user enters the date she gave birth. I would like to see, for example, today, "you gave birth 2 years, 5 months and 2 days ago, how do you integrate this calculation and display in my app?

Thanks for your help