3 releases
| 0.5.2 | Jan 23, 2026 |
|---|---|
| 0.5.1 | Jan 22, 2026 |
| 0.5.0 | Jan 22, 2026 |
#90 in Date and time
35,049 downloads per month
Used in 6 crates
(2 directly)
125KB
3.5K
SLoC
Rust-Postgres-Interval
A interval type for the postgres driver. Forked version.
Crate name on crates.io: pg_interval_2.
Contributing
There is a separate document on how to contribute to this repo here
Overview
Rust-Postgres-Interval is dedicated datatype for the postgres interval type.
extern crate pg_interval;
use pg_interval::Interval;
fn main() {
let interval = Interval::from_postgres(
"1 years 1 months 1 days 1 hours"
).unwrap();
let output = interval.to_iso_8601();
assert_eq!(String::from("P1Y1M1DT1H"), output);
}
Dependencies
~1–2MB
~33K SLoC