Skip to content

nager/Nager.Holiday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
}

Sponsor this project

 

Languages