Package to dynamically calculate the holidays dates from Portugal, both national and regional holidays for each district and county.
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
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
- python>=3.9
[Release 0.0.2] - 2022-08-12
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.
Can return holidays in various formats: list, table, timeseries.
Can calculate the count of business days for different fequencies.