C# Класс DateTimeExtensions.WorkingDaysExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
AddWorkingDays ( this day, int workingDays ) : System.DateTime

Adds or subctracts the number in workingDays as working days to day using the default IWorkingDayCultureInfo.

This algorithm is only efficient for small values of workingDays

AddWorkingDays ( this day, int workingDays, IWorkingDayCultureInfo workingDayCultureInfo ) : System.DateTime

Adds or subctracts the value in workingDays as working days to day.

This algorithm is only efficient for small values of workingDays.

AllYearHolidays ( this day ) : Holiday>.IDictionary

Retrieves the holidays that have and are still ocouring on the day year, using the default IWorkingDayCultureInfo.

AllYearHolidays ( this day, IWorkingDayCultureInfo workingDayCultureInfo ) : Holiday>.IDictionary

Retrieves the holidays that have and are still ocouring on the day year.

GetWorkingDays ( System.DateTime from, System.DateTime to, WorkingDayCultureInfo workingDayCultureInfo ) : int

Calculates the Workingdays in the range from / to

GetWorkingDays ( this from, System.DateTime to ) : int

Calculates the Workingdays in the range from / to

IsHoliday ( this day ) : bool

Checks if a specific day is a working day, using the default IWorkingDayCultureInfo.

IsHoliday ( this day, IWorkingDayCultureInfo workingDayCultureInfo ) : bool

Checks if a specific day is an holiday desregarding the day of the week.

IsWorkingDay ( this day ) : bool

Checks if a specific day is an holiday day, using the default IWorkingDayCultureInfo, desregarding the day of the week.

IsWorkingDay ( this day, IWorkingDayCultureInfo workingDayCultureInfo ) : bool

Checks if a specific day is a working day.

Описание методов

AddWorkingDays() публичный статический Метод

Adds or subctracts the number in workingDays as working days to day using the default IWorkingDayCultureInfo.
This algorithm is only efficient for small values of workingDays
public static AddWorkingDays ( this day, int workingDays ) : System.DateTime
day this The starting day.
workingDays int The number of working days to be added or subtracted.
Результат System.DateTime

AddWorkingDays() публичный статический Метод

Adds or subctracts the value in workingDays as working days to day.
This algorithm is only efficient for small values of workingDays.
public static AddWorkingDays ( this day, int workingDays, IWorkingDayCultureInfo workingDayCultureInfo ) : System.DateTime
day this The starting day.
workingDays int The number of working days to be added or subtracted.
workingDayCultureInfo IWorkingDayCultureInfo The culture of working days to be used in the calculation. See for more information.
Результат System.DateTime

AllYearHolidays() публичный статический Метод

Retrieves the holidays that have and are still ocouring on the day year, using the default IWorkingDayCultureInfo.
public static AllYearHolidays ( this day ) : Holiday>.IDictionary
day this The day used to gat the year from.
Результат Holiday>.IDictionary

AllYearHolidays() публичный статический Метод

Retrieves the holidays that have and are still ocouring on the day year.
public static AllYearHolidays ( this day, IWorkingDayCultureInfo workingDayCultureInfo ) : Holiday>.IDictionary
day this The day used to gat the year from.
workingDayCultureInfo IWorkingDayCultureInfo The used the get the holidays.
Результат Holiday>.IDictionary

GetWorkingDays() публичный статический Метод

Calculates the Workingdays in the range from / to
public static GetWorkingDays ( System.DateTime from, System.DateTime to, WorkingDayCultureInfo workingDayCultureInfo ) : int
from System.DateTime The starting day.
to System.DateTime The end day.
workingDayCultureInfo WorkingDayCultureInfo The culture of working days to be used in the calculation. See for more information.
Результат int

GetWorkingDays() публичный статический Метод

Calculates the Workingdays in the range from / to
public static GetWorkingDays ( this from, System.DateTime to ) : int
from this The starting day.
to System.DateTime The end day.
Результат int

IsHoliday() публичный статический Метод

Checks if a specific day is a working day, using the default IWorkingDayCultureInfo.
public static IsHoliday ( this day ) : bool
day this The day from calendar to check
Результат bool

IsHoliday() публичный статический Метод

Checks if a specific day is an holiday desregarding the day of the week.
public static IsHoliday ( this day, IWorkingDayCultureInfo workingDayCultureInfo ) : bool
day this The day from calendar to check
workingDayCultureInfo IWorkingDayCultureInfo The used the check if the day is a working day
Результат bool

IsWorkingDay() публичный статический Метод

Checks if a specific day is an holiday day, using the default IWorkingDayCultureInfo, desregarding the day of the week.
public static IsWorkingDay ( this day ) : bool
day this The day from calendar to check
Результат bool

IsWorkingDay() публичный статический Метод

Checks if a specific day is a working day.
public static IsWorkingDay ( this day, IWorkingDayCultureInfo workingDayCultureInfo ) : bool
day this The day from calendar to check
workingDayCultureInfo IWorkingDayCultureInfo The used the check if the day is a working day
Результат bool