nager / Nager.Holiday

Holiday Client for date.nager.at

Home Page:https://date.nager.at

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
}

About

Holiday Client for date.nager.at

https://date.nager.at

License:MIT License


Languages

Language:C# 100.0%