Print dates in a nicer format

This commit is contained in:
Joscha 2021-12-06 13:54:58 +00:00
parent 531a140c45
commit 3e70b2e2c9
5 changed files with 67 additions and 5 deletions

View file

@ -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) => &note.title,
}
}
pub fn desc(&self) -> &[String] {
match self {
Self::Task(task) => &task.desc,
Self::Note(note) => &note.desc,
}
}
}
#[derive(Debug)]
pub struct File {
pub contents: String,