Allow repetitions to start from last DONE
This commit is contained in:
parent
bfbf53784b
commit
11399468e7
4 changed files with 40 additions and 8 deletions
|
|
@ -4,7 +4,7 @@ use chrono::Datelike;
|
|||
|
||||
use super::commands::{
|
||||
Birthday, BirthdaySpec, Command, DateSpec, Delta, DeltaStep, Done, DoneDate, Expr, File,
|
||||
FormulaSpec, Note, Spec, Task, Time, Var, Weekday, WeekdaySpec,
|
||||
FormulaSpec, Note, Repeat, Spec, Task, Time, Var, Weekday, WeekdaySpec,
|
||||
};
|
||||
|
||||
fn format_desc(f: &mut fmt::Formatter<'_>, desc: &[String]) -> fmt::Result {
|
||||
|
|
@ -52,6 +52,15 @@ impl fmt::Display for Delta {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Repeat {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
if self.start_at_done {
|
||||
write!(f, "done ")?;
|
||||
}
|
||||
write!(f, "{}", self.delta)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for DateSpec {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
// Start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue