periodical

Crates.ioperiodical
lib.rsperiodical
version0.1.0
created_at2025-09-20 02:27:24.740178+00
updated_at2025-09-20 02:27:24.740178+00
descriptionManagement of all kinds of time intervals, use it to manage schedules, find overlaps, and more!
homepage
repositoryhttps://github.com/maeldroem/periodical
max_upload_size
id1847348
size1,943,946
Mældrøm (maeldroem)

documentation

https://docs.rs/periodical

README

:clock4: periodical :clock7:

crates.io libs.rs Periodical documentation build status

:two_hearts: GitHub Sponsor :two_hearts:

periodical is a crate to manage absolute and relative time intervals, use it to manage schedules, find overlaps, and more!

Just add the following in your Cargo.toml to start using periodical in your project!

periodical = "0.1"

About :book:

:watch: Time intervals are very important in many fields and applications, this is why this crate was made.

It manages time intervals precisely. It takes care of bound inclusivities and supports half-bounded and unbounded intervals.

:dart: It also provides precise ways to not only check for overlap between two intervals, but also find what kind of overlap exists!

Since bound inclusivities can introduce ambiguity for what we consider and overlap or containment, the crate provides many ways to disambiguate those cases in the way way you want.

This allows for treating a day as it really is: From midnight, included, to the next midnight, excluded. And still receive precise data about its duration and if it's adjacent to another day's interval.

:arrow_right: No more problems with flaky overlap checks and context-dependent durations!

periodical also allows you to re-precise an interval to your liking. For example, if you have to keep a timelog where the bounds have to be rounded to the nearest 45 minutes, you can do it with periodical! It also supports precising bounds individually and with durations that are not divisors of 24 hours :sunglasses:.

Most of the things you can think of doing with time intervals, you can do it with periodical :sparkles:

And if it doesn't, feel absolutely free to contribute or suggest a change :smile:

Roadmap :soon:

Future

(order doesn't represent priority)

  • serde support :1234:
  • Convenience methods for creating common intervals with ease :chart_with_upwards_trend:
  • Interval periodicity :repeat:
  • Implementation of rayon for lightning-fast iterators :zap:
  • Epsilon support for interval durations :ant:
  • Cargo mutants :mag:
  • Methods to get overlap/gap durations :left_right_arrow:
  • Interval formatting (standard and non-standard) :black_nib:
  • Precision change trait for relative intervals
  • Support for non-UTC timezones :globe_with_meridians:
  • Crate usage examples for practical solutions :wrench:
Commit count: 5

cargo fmt