Greetings I have the following code:
$anios=\Carbon\Carbon::parse($paciente->fecha_nacimiento)->age;
That basically calculates my age well, but this age is calculated with the current date.
How do I calculate the age for previous years or who just arrived?
That is, calculate the age of someone born in 1990 to 2011, for example, or of the same person born in 1990 until 2046?
Also, how to calculate the age of a newborn person in months?
for example: the person was born in September 2018 and calculate it until January 2019?