User Story
As a developer, I want to create a functionality that calculates Megan's age based on her date of birth and displays it in years, as well as the total number of days she has lived up to today. This will help us keep track of Megan's age and provide accurate age-related information.
Written By: Burcu Dediyok
Code
Date ageOfBirth = Date.newInstance(2014, 09, 04);
Integer days = ageOfBirth.daysBetween(Date.Today());
Integer MeganAge = Integer.valueOf(days / 365);
System.debug('Megan age is: ' + MeganAge);
System.debug('Megan lived ' + days + ' days until today!');