Skip to main content

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!

Metadata

Release files for service-days 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for service-days 0.0.7
File Size Uploaded
service_days-0.0.7.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for service-days 0.0.7
File Interpreter ABI Platform
service_days-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / service_days-0.0.7.tar.gz

Download URL service_days-0.0.7.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3e46836234c9331b1cdbc958f3dc3dbfd87034f602de2fd9d6088b2dd3582e1b
BLAKE2b-256 checksum
How to use checksums
72dabfd77697b396ad6b5df9a8366a6bd7feb5a19e9fd19a85464fa8958efe9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.23.0

Release files / service_days-0.0.7-py3-none-any.whl

Download URL service_days-0.0.7-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1407b5a5d3028da735496fd3224b4918cdf9b59fdf73bac8452a2638e0aa03c4
BLAKE2b-256 checksum
How to use checksums
a8d967c62cdbd32e8d33f4e57e31c48c5e5aa0164a237d85f6854d5fe72e5eee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.23.0

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page