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
LastSupportedYear
Gets the last year with complete holiday data.
int LastSupportedYear { get; }
Property Value
Methods
GetHolidays(int)
Returns all public holidays of a year, including half days, sorted by date.
IReadOnlyList<PublicHoliday> GetHolidays(int year)
Parameters
yearintThe 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
dayDayOfWeekThe day of the week.
Returns
- bool
True for weekend days.