Skip to content

Commit

Permalink
Merge pull request #653 from zerodat/filter_dateMath
Browse files Browse the repository at this point in the history
fixes #647 for date expressions
  • Loading branch information
zerodat committed Jan 29, 2024
2 parents fcf9a4c + f0b81fe commit b8cfdd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/modules/Filters/FilterLang.pegjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{
import { addRecurrenceToDate } from "../ProcessDataRequest/CreateRecurringTodo";
}}

filterQuery
= _ left:orExpr _ { return left; }
/ _ { return []; }
Expand Down Expand Up @@ -82,7 +86,7 @@ dateExpr
// recurrence calculations. All dates are returned from
// the parser as millisec since epoch (getTime()) to
// simplify comparisons in the filter lang execution engine.
let d = addIntervalToDate(new Date(left), count, unit);
let d = addRecurrenceToDate(new Date(left), unit, count);
return d.getTime();
}
/ left:dateLiteral { return left; }
Expand Down

0 comments on commit b8cfdd2

Please sign in to comment.