Metadata-Version: 2.4
Name: working-calendar
Version: 0.0.2
Summary: Deprecated utility for simple working-day calculations.
Author-email: Igor Iakovlev <igorxut@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/igorxut/working-calendar
Project-URL: Repository, https://github.com/igorxut/working-calendar
Project-URL: Issues, https://github.com/igorxut/working-calendar/issues
Keywords: business-days,calendar,deprecated,working-days
Classifier: Development Status :: 7 - Inactive
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Dynamic: license-file

# 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_count` for fast business-day arithmetic;
> * `pandas.tseries.offsets.CustomBusinessDay` for pandas-based date workflows;
> * `workalendar` or `holidays` for 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.

[![PyPI version](https://img.shields.io/pypi/v/working-calendar)](https://pypi.org/project/working-calendar/)
[![Python versions](https://img.shields.io/pypi/pyversions/working-calendar)](https://www.python.org/downloads/)
[![Wheel](https://img.shields.io/pypi/wheel/working-calendar)](https://pypi.org/project/working-calendar/)
[![Typed](https://img.shields.io/badge/typed-py.typed-blue)](https://peps.python.org/pep-0561/)
[![License](https://img.shields.io/github/license/igorxut/working-calendar)](https://github.com/igorxut/working-calendar/blob/master/LICENSE)

## 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:

```bash
pip install working-calendar
```

## Example

```python
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
```
