Crates.io | periodical |
lib.rs | periodical |
version | 0.1.0 |
created_at | 2025-09-20 02:27:24.740178+00 |
updated_at | 2025-09-20 02:27:24.740178+00 |
description | Management of all kinds of time intervals, use it to manage schedules, find overlaps, and more! |
homepage | |
repository | https://github.com/maeldroem/periodical |
max_upload_size | |
id | 1847348 |
size | 1,943,946 |
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"
: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:
(order doesn't represent priority)
serde
support :1234:rayon
for lightning-fast iterators :zap: