[−][src]Macro iocutil::at
macro datetime at specified condition
Example
use iocutil::prelude::*; let now = at!(now); let ten_minutes_ago = at!(10, minutes ago); let three_hours_ago = at!(3, hours ago); let two_days_ago = at!(2, days ago); let two_week_ago = at!(2, weeks ago); at!(ten_minutes_ago => 5, minutes); // 5 minutes ago at!(three_hours_ago => 1, hours); // 2 hours ago at!(two_days_ago => 1, days); // a day ago at!(two_week_ago => 1, weeks); // a week ago at!(now => 10, minutes); // 10 minutes later at!(now => 1, hours); // 1 hours later at!(now => 10, days); // 10 days later at!(now => 1, weeks); // 1 week later let x = vtdatetime(at!(day!(1992, 01, 17).unwrap() => 1, days)); assert_eq!(x.as_str(), "1992-01-18T00:00:00")