You'll have to create a variable that will represent the number of days, as well as variables for each unit of time (year, month, and day).
For the years, subtract the endyear from the startyear , and increment that answer by 365 or 366 (depending on whether or not it is a leap year) using a loop and iterates until it equals startyear - endyear. (you can't simply multiply it times 365, because of leap years). A year is a leap year if it is divisible by four, unless it is also divisible by 100. You'll have to check for this through each iteration of the loop.
Then, for the months, you'll have to check which month it is to see how many days it has.
Months with 31 days:
-January (1)
-March (3)
-May (5)
-July (7)
-August (8)
-October (10)
-December (12)
Months with 30 days:
-April
-June
-September
-November
And, of course, you can have a variable be created when it is a leap year that is "true", to check whether February has 28 or 29 days.
The days are the easiest: they're exactly what they say they are 😃