Fix range calculation for done tasks
This commit is contained in:
parent
c69af9bcde
commit
6d0acf8db7
4 changed files with 35 additions and 7 deletions
|
|
@ -289,6 +289,18 @@ pub enum DoneDate {
|
|||
},
|
||||
}
|
||||
|
||||
impl DoneDate {
|
||||
pub fn root(self) -> NaiveDate {
|
||||
match self {
|
||||
DoneDate::Date { root } => root,
|
||||
DoneDate::DateTime { root, .. } => root,
|
||||
DoneDate::DateToDate { root, .. } => root,
|
||||
DoneDate::DateTimeToTime { root, .. } => root,
|
||||
DoneDate::DateTimeToDateTime { root, .. } => root,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Done {
|
||||
pub date: Option<DoneDate>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue