Skip to main content

Crate rapport_temporal

Crate rapport_temporal 

Source
Expand description

Ergonomic, human friendly way to handle date-based time.

§Motivation

chrono is a great crate, and this library uses it, but it doesn’t easily cover the fact that lots of time humans just want to talk in dates. They might want to do something tomorrow, they want a date to do that, and developers want an easy way to make that happen without a lot of fuss.

Also with error handling, yes it might be the heat death date of the universe, but we don’t want or need error handling to fail when this is the case. If someone is being weird and giving the library extreme data, we fall back to sensible dates, to make the whole thing ergonomic and delightful to use.

§Modules

date: simple way of managing simple dates. time: simple way to manage what time it is, as an Instant. recurrence: simple, text-driven recurrence rules, that, yes, don’t cover every recurrence but also make it easy for a human to do most things. offset: language for relative dates, like yesterday, tomorrow, or a month from now. query: parser for human and agent friendly expression of relative dates, into this library’s types. clock: easily test for time changes with a testable clock.

Modules§

clock
For controlling time in programs, to make them testable over time periods.
date
Sensible approach to dates, the way a human would. Easily parses to and from the iso friendly YYYY-mm-dd format, such as 2026-04-27.
offset
Relative date scheduling for follow-ups and deferrals
query
Date query parsing for CLI applications.
recurrence
Manage an event that repeats without losing your mind.
time
Simple way to deal with the current time, as an Instant.

Enums§

Error