Syntax Distribute Days across years


I need to create variables that splits out a length of stay across years and enters the number of days in each of those years into separate year variables. For example, I have a length of stay for a case of 8.02 years.

CaseID StartDate EndDate
222 12/23/1988 01/01/1997

I want to create different variables (this part I can do) for the different years, in this case: 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997. But then I want to pull out the number of days that goes into those years


daysin1988 daysin1989 daysin1990 daysin1991
9 365.25 365.25 365.25

and so on

Can someone help me with the syntax?