Working Calendar
Deprecated / unmaintained
This project is no longer maintained and should not be used for new projects. It was originally created in 2018 as a small utility for working-day calculations.
For new code, consider maintained alternatives depending on your needs:
numpy.busdaycalendar/numpy.busday_countfor fast business-day arithmetic;pandas.tseries.offsets.CustomBusinessDayfor pandas-based date workflows;workalendarorholidaysfor country-specific public holidays;businesstimedelta,business-duration, or similar packages for business-time intervals with working hours.The package remains available on PyPI for historical compatibility. No new features, bug fixes, or compatibility updates are planned.
Description
Class WorkingCalendar is a utility for working-day calculations.
Current version
0.0.2 (final deprecation release)
Installation
Installation is kept here for existing users only:
pip install working-calendar
Example
from datetime import date
from working_calendar import WorkingCalendar
if __name__ == '__main__':
wc = WorkingCalendar()
holidays = [
date(2018, 2, 23),
date(2018, 3, 8),
date(2018, 3, 9),
]
additional_working_days = [
date(2018, 3, 10),
]
not_standard_working_day = (date(2018, 3, 10), 240) # 240 min = 4 hours
wc.extend_holidays(holidays)
wc.extend_working_days(additional_working_days)
wc.update_not_standard_working_day(not_standard_working_day[0], not_standard_working_day[1])
print(wc.count_working_days_between(date(2018, 3, 1), date(2018, 3, 12))) # 7 working days
print(wc.count_working_days_in_year(2018)) # 259 working days
print(wc.count_working_days_in_month(2018, 2)) # 19 working days
print(wc.count_working_minutes_between(date(2018, 3, 1), date(2018, 3, 12))) # 3120 minutes
print(wc.count_working_minutes_in_year(2018)) # 124080 minutes
print(wc.count_working_minutes_in_month(2018, 2)) # 9120 minutes
print(wc.count_working_hours_between(date(2018, 3, 1), date(2018, 3, 12))) # 52.0 hours
print(wc.count_working_hours_in_year(2018)) # 2068.0 hours
print(wc.count_working_hours_in_month(2018, 2)) # 152.0 hours
print(wc.get_next_working_day(date(2018, 3, 7))) # 2018-03-10
print(wc.skip_working_days(date(2018, 3, 10), 10)) # 2018-03-23
Metadata
Release files for working-calendar 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| working_calendar-0.0.2.tar.gz | 9.2 kB | Without provenance | Details for working_calendar-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| working_calendar-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for working_calendar-0.0.2-py3-none-any.whl |
Total release size: 17.8 kB
Release files / working_calendar-0.0.2.tar.gz
| Download URL | working_calendar-0.0.2.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d0ad0c960f1b9fd6004bd794ad49577a27d9a1093fc1331c27f641316223de2
|
|
BLAKE2b-256 checksum How to use checksums |
4a18168386ef085132d03659f11528b04caf455759f5d66914ab3c24a62c823a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / working_calendar-0.0.2-py3-none-any.whl
| Download URL | working_calendar-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a45d4595b4728bfef94e941edf3a9306c515c9c17eff702f563a9e6817e47a00
|
|
BLAKE2b-256 checksum How to use checksums |
d547830a06781a8dcbda5c1a3d55c2132926e588fe0a0052f8025c48703f80fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for working-calendar 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.