WorkingDaysOfWeek Enum
Definition
Represents a named pattern of working days within a seven-day week.
public enum WorkingDaysOfWeek
- Extension Methods
Fields
MondayToFriday = 0Indicates a Monday through to Friday working week (Western standard).
MondayToSaturday = 1Indicates a Monday through to Saturday working week.
MondayToThursdayAndSaturday = 2Indicates a Monday through to Thursday, and Saturday working week.
SaturdayToThursday = 3Indicates a Saturday through to Thursday working week (e.g. parts of the Middle East).
SaturdayToWednesday = 4Indicates a Saturday through to Wednesday working week.
SundayToFriday = 5Indicates a Sunday through to Friday working week.
SundayToThursday = 6Indicates a Sunday through to Thursday working week (e.g. Israel, parts of the Middle East).
Custom = 7Indicates a non-standard working week whose pattern is supplied externally by an IWeekendDefinitionProvider.
AllDays = 8Indicates that every day of the week is treated as a working day (no weekend is defined).
Use this value when the working week has no rest day - for example, an "always on" service schedule or regional configurations that do not define a standard weekend.
Remarks
WorkingDaysOfWeek enumerates the commonly observed working-week patterns across global regions. Each of the seven named working weeks corresponds to the DayOfWeekSet preset of the same name, and AllDays to All; the extension methods on WorkingDaysOfWeekExtensions convert in both directions. Custom has no set of its own.
Use a named value when the working week is one of the listed patterns. When the working week is non-standard (for example a four-day week or an unevenly distributed schedule), pass a DayOfWeekSet directly to the overloads that accept one, or use Custom together with an IWeekendDefinitionProvider that defines the week. Custom is also the value ToWorkingDaysOfWeek(DayOfWeekSet) returns for a set that matches no named pattern.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |