Simplify DoneDate when formatting
This commit is contained in:
parent
20fc4bd3cc
commit
170e291ec5
4 changed files with 39 additions and 28 deletions
|
|
@ -239,8 +239,7 @@ impl fmt::Display for Statement {
|
|||
|
||||
impl fmt::Display for DoneDate {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
// TODO Remove redundant dates
|
||||
match self {
|
||||
match self.simplified() {
|
||||
DoneDate::Date { root } => write!(f, "{}", root),
|
||||
DoneDate::DateTime { root, root_time } => write!(f, "{} {}", root, root_time),
|
||||
DoneDate::DateToDate { root, other } => write!(f, "{} -- {}", root, other),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue