Skip to main content

Python module for determining if a datetime is within a time period.

Based on the original TimePeriod module written by Paul Boyd <boyd.paul2@gmail.com>.

Installation

$ sudo pip install timeperiod2

Usage

import datetime
import timeperiod
# will return True iff we have Monday, Tuesday or Thursday:
timeperiod.in_period('wd {mon tue thu}')
# will return True iff we have "office time"
timeperiod.in_period('wd {Mon-Fri} hr {9-17}', datetime.datetime.now())

License

Released under the LGPL:

http://www.gnu.org/licenses/#LGPL

Also see the LICENSE file.

Metadata

Release files for timeperiod2 20.10.0

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

Built distribution (wheel)

Table of built distributions (wheels) for timeperiod2 20.10.0
File Interpreter ABI Platform
timeperiod2-20.10.0-py3-none-any.whl Python 3 none any Details

Release files / timeperiod2-20.10.0-py3-none-any.whl

Download URL timeperiod2-20.10.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9cc4c8ec3f1971c7de8fcd44223805b38e2025deccbb9f49f62999a2eaff74d
BLAKE2b-256 checksum
How to use checksums
12919919e354700912e5b976e1612e114859db23280c5b8632b3627e81f2a77c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Release history Release notifications | RSS feed

This release

20.10.0 This release

1 release file

0.1

1 release file

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