Print dates in a nicer format
This commit is contained in:
parent
531a140c45
commit
3e70b2e2c9
5 changed files with 67 additions and 5 deletions
|
|
@ -325,6 +325,22 @@ pub enum Command {
|
|||
Note(Note),
|
||||
}
|
||||
|
||||
impl Command {
|
||||
pub fn title(&self) -> &str {
|
||||
match self {
|
||||
Self::Task(task) => &task.title,
|
||||
Self::Note(note) => ¬e.title,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn desc(&self) -> &[String] {
|
||||
match self {
|
||||
Self::Task(task) => &task.desc,
|
||||
Self::Note(note) => ¬e.desc,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct File {
|
||||
pub contents: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue