From 11399468e7df506199fe5b5d00d36e2e0cb5aef0 Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 25 Nov 2021 01:23:50 +0100 Subject: [PATCH] Allow repetitions to start from last DONE --- src/files/commands.rs | 10 +++++++++- src/files/format.rs | 11 ++++++++++- src/files/grammar.pest | 3 ++- src/files/parse.rs | 24 +++++++++++++++++++----- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/files/commands.rs b/src/files/commands.rs index e132520..0e778f6 100644 --- a/src/files/commands.rs +++ b/src/files/commands.rs @@ -97,6 +97,14 @@ impl DeltaStep { #[derive(Debug)] pub struct Delta(pub Vec); +#[derive(Debug)] +pub struct Repeat { + /// Start at the date when the latest `DONE` was created instead of the + /// task's previous occurrence. + pub start_at_done: bool, + pub delta: Delta, +} + #[derive(Debug)] pub struct DateSpec { pub start: NaiveDate, @@ -105,7 +113,7 @@ pub struct DateSpec { pub end: Option, pub end_delta: Option, pub end_time: Option