Function ndate::execute [−][src]
pub fn execute<'a>(config: Config) -> Result<(), &'a str>
Expand description
Takes in the input as Config struct and displays converted date if the operations are successful, else returns error.
Examples
use ndate::Config; let args = vec![String::from("ndate"),String::from("-b"),String::from("1985-09-09")]; let working_config = Config::new(&args).unwrap(); ndate::execute(working_config).unwrap_or_else(|_err| assert!(false));