Day of Week
DayOfWeek is a Cron-like Schedule that
recurs every specified day of each week
DateTime[] dates =
[
new(2022, 1, 1), // Saturday
new(2022, 1, 2), // Sunday
new(2022, 1, 3), // Monday
new(2022, 1, 4), // Tuesday
new(2022, 1, 5), // Wednesday
new(2022, 1, 6), // Thursday
new(2022, 1, 7), // Friday
];
Schedule hourOfDay = Schedule.DayOfWeek(DayOfWeek.Monday, dates.ToTestProvider());
| Date | Duration | Result |
|---|---|---|
| Saturday 01 | 2 days | Monday 01 |
| Sunday 01 | 1 day | Monday 01 |
| Monday 01 | 1 week | Monday 01 |
| Tuesday 01 | 6 days | Monday 01 |
| Wednesday 01 | 5 days | Monday 01 |
| Thursday 01 | 4 days | Monday 01 |
| Friday 01 | 3 days | Monday 01 |