Skip to main content

format_interval

Function format_interval 

Source
pub fn format_interval(months: i32, micros: i64) -> String
Expand description

Render an Interval { months, micros } in a PG-ish shape. The output mirrors psql’s text format: years/months from the months part, days/HH:MM:SS[.frac] from the microsecond part. Empty parts are omitted; an all-zero interval renders as 0.