Initially, you can start by ignoring needing to know what day of the week you are looking at. Just use a loop and some simple DateTime arithmetic. If I were solving this using DateTime (or DateOnly in a grown up .NET version), I would consider the following:
- The date we start our calculation from is supplied to us as a parameter
- We are ending when the calculated start date of a shift is greater than 1 year from now
Knowing this, I would create a list of DateTime (DateOnly) that will contain the first day off.
In a loop, I would add 6 days to the start date. This date would be added to the list.
The new start date would be 2 days from this date.
Repeat the loop until we have past the end date
If I want to know the start dates of my days off, I simply loop over the list and look at the DayOfWeek. The last day of this time off is the item in the list + 1 day.
This isn't complicated code to write. Try it, and let us know how you get on.