Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A representation of a duration of time

Project Description

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).


  • 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
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
datetime-interval-0.2.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source Jul 10, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting