Add recur and wait relative times

This commit is contained in:
Dheepak Krishnamurthy 2021-05-14 16:05:30 -06:00
parent 922be0cdf1
commit 52c234f4a9

View file

@ -214,6 +214,10 @@ impl TaskReportTable {
Some(v) => vague_format_date_time(Local::now().naive_utc(), NaiveDateTime::new(v.date(), v.time())),
None => "".to_string(),
},
"until" => match task.until() {
Some(v) => vague_format_date_time(Local::now().naive_utc(), NaiveDateTime::new(v.date(), v.time())),
None => "".to_string(),
},
"until.remaining" => match task.until() {
Some(v) => vague_format_date_time(Local::now().naive_utc(), NaiveDateTime::new(v.date(), v.time())),
None => "".to_string(),
@ -282,6 +286,18 @@ impl TaskReportTable {
.join(","),
None => "".to_string(),
},
"recur" => match task.recur() {
Some(v) => v.clone(),
None => "".to_string(),
},
"wait" => match task.wait() {
Some(v) => vague_format_date_time(NaiveDateTime::new(v.date(), v.time()), Local::now().naive_utc()),
None => "".to_string(),
},
"wait.remaining" => match task.wait() {
Some(v) => vague_format_date_time(Local::now().naive_utc(), NaiveDateTime::new(v.date(), v.time())),
None => "".to_string(),
},
"description.count" => {
let c = match task.annotations() {
Some(a) => format!("[{}]", a.len()),