with_lazy_date

Function with_lazy_date 

Source
pub fn with_lazy_date<D>(
    interval: &str,
    get_date: D,
) -> Result<Duration, ParseError>
where D: FnOnce() -> DateTime<Utc> + 'static,
Expand description

Parse an interval like “1 year 6 months”.

It can include years, months, weeks, days, hours, minutes and seconds.

Years and months will be evaluated as offset from the date generated by the function.