Metadata-Version: 2.4
Name: datetime-interval
Version: 0.3
Summary: A representation of a duration of time
Home-page: https://www.github.com/zeckalpha/datetime-interval
Author: Kyle Marek-Spartz
Author-email: kyle.marek.spartz@gmail.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE.md
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: summary

# 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](https://pendulum.eustace.io/) or [aniso8601](https://github.com/ncalexan/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 `isoformat` method (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
