Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datetime-interval

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datetime-interval

A representation of a duration of time

  • 0.2
  • PyPI
  • Socket score

Maintainers
1

datetime-interval

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc