Determines if a day is a working day in Russia
Project description
WorkCalendar
A simple no-nonsense library to find out whether a day is a working day in Russia.
Data parsed from consultant.org.
Data available only for years 2015-2025.
Feel free to use the raw json file.
Installation
pip install work-calendar
Basic (and only) usage
>>> from datetime import date
>>> from work_calendar import WorkCalendar
>>>
>>> dt = date(year=2021, month=1, day=2)
>>> WorkCalendar.is_workday(dt)
False
>>> dt_out_of_bounds = date(year=2027, month=1, day=2)
>>> WorkCalendar.is_day_off(dt_out_of_bounds)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
<...>
raise exceptions.NoDataForYearError(year)
work_calendar.exceptions.NoDataForYearError: No data found for holidays in year 2027
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
work_calendar-0.2.3.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for work_calendar-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed7d78e2b800137d5290149b0409821e30bbcf1079f09d51f3d5b19d76dd66f7 |
|
MD5 | 7a2cb3ea795eecd0f492d3f28807e39d |
|
BLAKE2b-256 | 3aa83449a32c8ad381a70f45f141f4acd9d76e3ef7d8feb314d83c688b930843 |