I want to calculate the number of days from consecutive periods.
In the df below I have four columns: