11 Jun, 2024 - About 2 minutes
date.nager
Intro
Nager.Date is an open source project with the goal of making holidays easy to query.
About
Discover the convenience of easily accessing holidays from over 100 countries with Nager.Date. Our popular project utilizes the power of .NET and offers a user-friendly public REST API for seamless integration into your application.
Testing
Use the following sample python code to obtain the national holiday in Portugal in 2024 get_national_holidays.py
.
import json |
You should have a similar output when running
2024-01-01 - New Year's Day |
Countries coverage
You can find an overview of the supported countries here.
Holiday types
What variants of holidays are supported by Nager.Date
Type | Description |
---|---|
Public | Public holiday |
Bank | Bank holiday, banks and offices are closed |
School | School holiday, schools are closed |
Authorities | Authorities are closed |
Optional | Majority of people take a day off |
Observance | Optional festivity, no paid day off |
Data precision
There is no generally valid designation for the next administrative level of countries. “Nager.Date” supports the initial subdivision of a country, but we will not support a detailed level because the effort required is too high.
To keep it generally valid, we will treat this subdivision as SubdivisionCodes, this will replace the current designation Counties.
United States of America use States
Germany use States
Austria use States
Switzerland use Cantons
Brazil use States
Australia use States
or Territories
Russia use Federal districts
Canada use Province
or Territories
Response Model
date | The date of the holiday |
localName | Local name |
name | English name |
countryCode | ISO 3166-1 alpha-2 |
fixed | Is this public holiday every year on the same date |
global | Is this public holiday in every county (federal state) |
counties | If it is not global you found here the Federal states (ISO-3166-2) |
launchYear | The launch year of the public holiday |
types | The types of the public holiday, several possible (Public, Bank, School,…) |
Example:
[ |