exercism-solutions/rust/gigasecond/src/lib.rs

6 lines
205 B
Rust

use time::{ext::NumericalDuration, PrimitiveDateTime as DateTime};
// Returns a DateTime one billion seconds after start.
pub fn after(start: DateTime) -> DateTime {
start + 1_000_000_000.seconds()
}