Skip to content

Majramos/holidays-pt

Repository files navigation

Holidays

Package to dynamically calculate the holidays dates from Portugal, both national and regional holidays for each district and county.

Installation

Use the package manager pip to install holidays.

git clone https://gitlab.com/majramos/holidays-pt.git

cd holidays-pt

pip install holidays

or

python -m pip install git+https://gitlab.com/majramos/holidays-pt.git

Usage/Examples

from holidays import Holidays
hol = holidays.Holidays('2021-01-01', '2021-12-31')
hol.calculate().as_list()
[{'extent': 'national',
'label': 'Ano Novo',
'calculate': 'january 1st',
'date': datetime.datetime(2020, 1, 1, 0, 0)},
...
]

A more complete example can be found in the example notebook

Software dependencies

  • python>=3.9

Latest releases

[Release 0.0.2] - 2022-08-12

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GPLv3

Notes

Can return holidays in various formats: list, table, timeseries.

Can calculate the count of business days for different fequencies.

About

Module to calculate the portuguese holidays date

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published