A representation of a duration of time
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
datetime-interval
[!WARNING] This project is archived and is no longer maintained. No further updates or releases will be made. For representing durations, intervals, or recurring events, we recommend using Python's built-in
datetime.timedelta, or libraries like Pendulum or aniso8601.
The builtin datetime module provides classes for points in time (date, and
datetime) as well as durations (timedelta), but it does not account for
time durations at a specific point. This module provides Interval, which
contains a start and end date or datetime, and a duration timedelta.
This is useful for representing calendar events. This module also provides
PeriodicInterval which can be used for recurring events, by containing a
period timedelta and a count of occurrences (either an int or forever).
TODO:
- Interval
isoformatmethod (start/end).- This wouldn't work on PeriodicInterval, as recurring intervals have a different semantics in ISO 8601.
- Property-based testing with
props - Add operators for PeriodicInterval (*, [])
- How to account for e.g. every Tuesday and Thursday
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datetime_interval-0.3.tar.gz.
File metadata
- Download URL: datetime_interval-0.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fce67a2af868e2f9c18f0d819abaacda8a37fe617ee8b84692ee3bf24314905
|
|
| MD5 |
d6653f2504fde81e06994197237545a8
|
|
| BLAKE2b-256 |
81d7298276b5054a7f6b1d6749e50272b6489ea4e29ad19049f145fe251ab36a
|
File details
Details for the file datetime_interval-0.3-py3-none-any.whl.
File metadata
- Download URL: datetime_interval-0.3-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bb24f182eecd80c70c07c3dc30f7eb619ba436a2d04b898b2c1d76c35657d42
|
|
| MD5 |
a38b4893302dfc4263d11b8998ca892c
|
|
| BLAKE2b-256 |
8dfd0b10edc98d9703285bc4c4416a88d74bcf474d6825b09dbc3085f48c5825
|