Shifts values from 1 to 7 like this: 1 2 3 4 5 6 7 -> 2 3 4 5 6 7 1
| 76 | |
| 77 | // Shifts values from 1 to 7 like this: 1 2 3 4 5 6 7 -> 2 3 4 5 6 7 1 |
| 78 | int32_t NextWeekdayNumber(osmoh::Weekday const wd) |
| 79 | { |
| 80 | auto dayNumber = WeekdayNumber(wd); |
| 81 | // If first element of the gourp would be evaluated to 0 |
| 82 | // the resulting formula whould be (dayNumber + 1) % kDaysInWeek. |
| 83 | // Since the first one evaluates to 1 |
| 84 | // the formula is: |
| 85 | return dayNumber % kDaysInWeek + 1; |
| 86 | } |
| 87 | |
| 88 | // Returns a vector of Weekdays with no gaps and with Sunday as the last day. |
| 89 | // Exampls: |
no test coverage detected