Class DayOfWeekExtensions
- Namespace
- Garyon.Extensions
- Assembly
- Garyon.dll
Provides extensions for the DayOfWeek enum.
public static class DayOfWeekExtensions
- Inheritance
-
DayOfWeekExtensions
- Inherited Members
Methods
DaysSinceWeekStart(DayOfWeek, DayOfWeek)
Gets the number of days since the week start.
public static int DaysSinceWeekStart(this DayOfWeek currentDay, DayOfWeek weekStart)
Parameters
Returns
- int
The number of days since the first day in the week, according to
weekStart.
IsWeekday(DayOfWeek)
Determines whether the given DayOfWeek represents a weekday, between Monday and Friday.
[ExcludeFromCodeCoverage]
public static bool IsWeekday(this DayOfWeek day)
Parameters
Returns
IsWeekend(DayOfWeek)
Determines whether the given DayOfWeek represents a weekend day, which is Saturday or Sunday.
[ExcludeFromCodeCoverage]
public static bool IsWeekend(this DayOfWeek day)
Parameters
Returns
ShiftRegardingStartingWeekDay(DayOfWeek, DayOfWeek)
Shifts the given DayOfWeek to another, regarding the new starting day of week.
public static DayOfWeek ShiftRegardingStartingWeekDay(this DayOfWeek value, DayOfWeek starting)