Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.51 KB

README.md

File metadata and controls

36 lines (29 loc) · 1.51 KB

GitHub Sponsors GitHub License GitHub Actions Workflow Status

Nager.Holiday

Nager.Holiday is the client for Nager.Date, a popular project for querying holidays.

Country Support

The list of supported countries can be found here

NuGet

The NuGet package is available via NuGet

PM> install-package Nager.Holiday

Examples

Get all publicHolidays of a country and year

using var holidayClient = new HolidayClient();
var holidays = await holidayClient.GetHolidaysAsync(2022, "br");

foreach (var holiday in holidays)
{
    //holiday...
    //holiday.Date -> The date
    //holiday.LocalName -> The local name
    //holiday.Name -> The english name
    //holiday.Fixed -> Is this public holiday every year on the same date
    //holiday.Global -> Is this public holiday in every county (federal state)
    //holiday.Counties -> Is the public holiday only valid for a special county ISO-3166-2 - Federal states
    //holiday.Type -> Public, Bank, School, Authorities, Optional, Observance
}