Allow today() function for date comparisons
Closed this issue · 1 comments
davidmegginson commented
Requested by @SimonbJohnson
Make it possible for the with_rows() / without_rows() filter to compare to the current date rather than just a constant value.
Possible implementation strategy:
- Modify hxl.model.RowQuery to allow comparisons to formulas as well as constants.
- Add a today() function to the formulas, that returns the current ISO date
That would also allow comparing columns to each-other, which could be powerful.
davidmegginson commented
today() function added to row formulas, and row formulas can be on the right side of comparisons for row queries.
The row query for future dates would look like
#date > {{ today() }}
This link demonstrates just the today() function (not the query), adding a new column to the left of the dataset with today's date: