py-time-between 
Ordinary package to say if a time variable falls between two given times.
Motivation: I was working in a test to a job opening, and I needed it, but I did not want google this. I know that exists a lot of code like this.
Usage:
is_time_between(testing_time, start_time_inclusive, end_time_inclusive)
from datetime import time
from timebetween import is_time_between
def test_is_time_between():
t, s, e = time(0), time(0), time(0)
assert is_time_between(t, s, e)
t, s, e = time(0, 0, 0, 1), time(0), time(0, 0, 0, 2)
assert is_time_between(t, s, e)
t, s, e = time(0, 0, 0, 1), time(0, 0, 0, 1), time(0, 0, 0, 2)
assert is_time_between(t, s, e)
t, s, e = time(0, 0, 0, 2), time(0, 0, 0, 1), time(0, 0, 0, 2)
assert is_time_between(t, s, e)
t, s, e = time(0, 0, 1), time(23, 59, 59), time(0, 0, 2)
assert is_time_between(t, s, e)
t, s, e = time(12, 0, 0), time(23, 59, 59), time(0, 0, 0)
assert is_time_between(t, s, e)
t, s, e = time(23, 59, 57), time(23, 59, 59), time(23, 59, 57)
assert is_time_between(t, s, e)
t, s, e = time(23, 59, 58), time(23, 59, 59), time(23, 59, 57)
assert not is_time_between(t, s, e)
t, s, e = time(22), time(22), time(5, 59, 59)
assert is_time_between(t, s, e)
# Hey, did you see a uncovered test case?
# Please, open a PR.
Metadata
Release files for py-time-between 0.1.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 |
|---|---|---|---|---|
| py-time-between-0.1.2.tar.gz | 1.9 kB | Without provenance | Details for py-time-between-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_time_between-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for py_time_between-0.1.2-py3-none-any.whl |
Total release size: 4.6 kB
Release files / py-time-between-0.1.2.tar.gz
| Download URL | py-time-between-0.1.2.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23c2fc4dcae350a6b35d8d1adae2351a1277844837ded3287dc004df2c5fa708
|
|
BLAKE2b-256 checksum How to use checksums |
41a1e6b661a4b9c236d2bbabf0b874fe9f7c704687fed108c9b0af0e19495cb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6
|
Release files / py_time_between-0.1.2-py3-none-any.whl
| Download URL | py_time_between-0.1.2-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
073533cb24c793e7fce4b522ceeddea411ac50323b113ff8f3afa1934a8a6700
|
|
BLAKE2b-256 checksum How to use checksums |
5dde5aa4af0b05e3ee9a718138ad5faa1672b75a6685170e094045fdbb9e9ef1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6
|
Security for py-time-between 0.1.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.