Table of Contents

Interface IHolidayCalendar

Namespace
HeroKit.Globalization
Assembly
HeroKit.dll

Public holidays and weekend days of a country.

public interface IHolidayCalendar
Extension Methods

Properties

FirstSupportedYear

Gets the first year with complete holiday data.

int FirstSupportedYear { get; }

Property Value

int

LastSupportedYear

Gets the last year with complete holiday data.

int LastSupportedYear { get; }

Property Value

int

Methods

GetHolidays(int)

Returns all public holidays of a year, including half days, sorted by date.

IReadOnlyList<PublicHoliday> GetHolidays(int year)

Parameters

year int

The year.

Returns

IReadOnlyList<PublicHoliday>

The holidays of the year.

Exceptions

ArgumentOutOfRangeException

The year is outside the supported range.

IsWeekend(DayOfWeek)

Checks whether a day of the week is a weekend day.

bool IsWeekend(DayOfWeek day)

Parameters

day DayOfWeek

The day of the week.

Returns

bool

True for weekend days.