Merge pull request #225 from kdheepak/add-recur-and-wait-relative-times

Add recur and wait relative times
This commit is contained in:
Dheepak Krishnamurthy 2021-05-14 16:29:53 -06:00 committed by GitHub
commit 81f05014a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()),