Skip to main content

A simple Python helper class to determine Italian holidays.

Project description

ItalianHolidays

A simple Python helper class to determine Italian holidays. Easter holidays' calculation will work for dates between 1900-2199.

PyPI status PyPI pyversions PyPI version shields.io PyPI - Downloads GitHub license

Install

Using Pip

pip install italian-holidays

Usage

from italian_holidays import italian_holidays
from datetime import datetime

holidays = italian_holidays()

# Passing string
is_holiday = holidays.is_holiday("2024-06-02")
print(is_holiday) # True

# Passing datetime object
day = datetime(2031, 4, 14)
is_holiday = holidays.is_holiday(day)
print(is_holiday) # True

# Getting holiday's name (return None if date is not an italian holiday)
holiday_name = holidays.holiday_name("2020-11-01")
print(holiday_name) # All Saints' Day

Licence

Source code can be found on github, licenced under MIT.

Developed by Giuseppe Bruno

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

italian-holidays-0.0.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

italian_holidays-0.0.3-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page