Skip to main content

A tool to help calculate the number of 'work days' between two dates given a particular schedule.

Project description

service-days

A tool to help calculate the number of service days between two dates given a service schedule.

PyPI - Version PyPI - Python Version


Table of Contents

Concepts

There are many libraries that will find the number work days between two dates, but what if you don't work Monday to Friday? What if your schedule is Monday, Thursday, Saturday?

This library calls that 3 day work schedule "service days"; as in, there are 3 "service days" in a given week.

It will calculate the number of service days between two dates given a service schedule.

service-days is a library that will calculate the number of service days between two dates

Tools

Add Days Given a date and a service schedule, add x number of days to get to the next service day.

Days in Period Given a start date and an end date, calculate the number of service days in that period.

Convert JSON formatted text list, to list of days Given a JSON formatted list of days, convert it to a list of days.

e.g.

'["Mon", "Tue"]'

Explanation / Usage

This is a quick explanation, may not be 100% accurate. See the tests for more examples, and examples of how the methods are used.

Service Days

Installation

pip install service-days

License

service-days is distributed under the terms of the MIT license.

Miscellany

Logging

Uses standard Python logging, with the name servicedays

To make quiet in your code do the following

        s_logger = logging.getLogger('servicedays')
        s_logger.setLevel(logging.WARNING)

Hatch

This is my first attempt at using hatch to manage a Python project. I'm not sure if I'm doing it right, but I'm trying. If you have any suggestions, please let me know. Thanks!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

service_days-0.0.7.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distribution

service_days-0.0.7-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page