[][src]Macro iocutil::la

macro_rules! la {
    ($from:expr => $to:expr) => { ... };
    ($from:expr =>) => { ... };
    (=> $to:expr) => { ... };
}

last analysis search modifier macro

Example

use iocutil::prelude::*;

let f = day!(2019, 11, 01).unwrap();
let t = day!(2019, 11, 02).unwrap();

let la1 = la!(f => t);
assert_eq!(la1.as_str(), "(la:2019-11-01T00:00:00+ AND la:2019-11-02T00:00:00-)");

let la2 = la!(f =>);
assert_eq!(la2.as_str(), "la:2019-11-01T00:00:00+");

let la3 = la!(=> t);
assert_eq!(la3.as_str(), "la:2019-11-02T00:00:00-");

let for_a_week = la!(at!(1, weeks ago) =>);