A fast, efficient Python library for Russia country, province and state specific sets of holidays on the fly. It aims to make determining whether a specific date is a holiday as fast and flexible as possible.
Package: | |
---|---|
CD/CI: | |
Meta: |
The latest stable version can always be installed or updated via pip:
$ pip install --upgrade holidays-ru
View Quick Start. You can use original library from other country and other functional https://github.com/dr-prodigy/python-holidays
from datetime import date
from holidays_ru import check_holidays, is_holidays
check_holiday(date(2023, 1, 1)) # True
check_holiday(date(2023, 1, 12)) # False
check_holiday(date(2022, 12, 31)) # True
check_holiday(date(2022, 12, 31), with_weekends=False) # False, it's Sunday
is_holiday(date(2023, 1, 1)) # "New Year's Day"
is_holiday(date(2023, 1, 12)) # ""
is_holiday(date(2023, 1, 15)) # "Weekend"
is_holiday(date(2023, 1, 15)) # "Moved weekend"
is_holiday(date(2023, 1, 12)) # "", it's work Sunday
Issues and pull requests are always welcome. Please see here for more information.
Code and documentation are available according to the MIT License (see LICENSE).