It sounds very simple, but I do not understand.
So, what is the easiest way to get the number of days between two DayOfWeeks when the first is the starting point? If the next business day is earlier, it should be considered next week.
DayOfWeek-Enumeration starts on Sunday(0) and ends on Saturday(6) .
1. Monday = 1 2. Thursday = 4 Result: 4 - 1 = 3 1. Thursday = 4 2. Monday = 1
But this result is incorrect, because between Thursday and Monday (next week) there are 4 days.
source share