tbh yaml too many lines this is k

main
Bel LaPointe 2023-11-29 06:11:08 -07:00
parent b2c7df2361
commit a96c5dc1f8
1 changed files with 6 additions and 1 deletions

View File

@ -101,8 +101,13 @@ fn log(f: &String, since: &Option<String>) -> Result<(), String> {
fn parse_time(since: &Option<String>) -> Result<SystemTime, String> { fn parse_time(since: &Option<String>) -> Result<SystemTime, String> {
match since { match since {
Some(since) => { Some(since) => {
match DateTime::parse_from_str(since, "%Y-%m-%d") {
Ok(dt) => {
Err("not impl".to_string()) Err("not impl".to_string())
}, },
Err(msg) => Err(format!("failed to parse {}: {}", since, msg)),
}
},
None => Ok(SystemTime::now().sub(Duration::from_secs(60*60*24*7))), None => Ok(SystemTime::now().sub(Duration::from_secs(60*60*24*7))),
} }
} }