Evaluate REMINDs

This commit is contained in:
Joscha 2021-12-21 00:14:14 +01:00
parent fe22c66c5c
commit 66da16f4e3
6 changed files with 115 additions and 29 deletions

View file

@ -324,7 +324,7 @@ impl From<&commands::WeekdaySpec> for FormulaSpec {
impl FormulaSpec {
fn range(&self, s: &CommandState<'_>) -> Option<DateRange> {
let mut range = s
.range
.range_with_remind()
.expand_by(&self.end_delta)
.move_by(&self.start_delta);
@ -367,7 +367,7 @@ impl<'a> CommandState<'a> {
for day in range.days() {
if spec.eval(index, day)? {
let dates = spec.dates(index, day)?;
self.add(self.kind(), Some(dates));
self.add(self.entry_with_remind(self.kind(), Some(dates))?);
}
}
}