Table of Contents

IWeekendDefinitionProvider Interface

Definition

Namespace
Bodu.Extensions
Assembly
Bodu.Core.dll
Package
Bodu.Core 1.0.1
Source
IWeekendDefinitionProvider.cs

Defines a provider interface for determining whether a given DayOfWeek is considered part of the weekend.

public interface IWeekendDefinitionProvider
Extension Methods

Remarks

Implement this interface to supply custom weekend definitions that are not covered by the built-in WorkingDaysOfWeek presets. This allows support for region-specific, cultural, or organizational weekend patterns beyond standard configurations such as MondayToFriday or SundayToThursday.

Methods

IsWeekend(DayOfWeek)

Determines whether the specified DayOfWeek is considered part of the weekend.

bool IsWeekend(DayOfWeek dayOfWeek)

Parameters

dayOfWeek DayOfWeek

The day of the week to evaluate.

Returns

bool

true if the specified dayOfWeek is considered part of the weekend; otherwise, false.

Remarks

This method applies the logic defined by the implementing provider, which may differ from the commonly used WorkingDaysOfWeek presets such as MondayToFriday or SaturdayToThursday. Custom implementations enable support for hybrid, rotating, or domain-specific weekend rules.

Applies to

ProductVersions
.NET8, 10