Forum
How do I filter somewhere between two dates?
Does anyone have a good solution to filtering somewhere between two dates in a template?
Something like this: <perch:if id="{today}" match="eqbetween" value="start_date, end_date" format="Y-m-d" format-both="true"> (Does not work).
Thanks. Stig
What are
start_date
andend_date
? Those strings aren't dates.start_date
andend_date
is from another template, see below.S
Like this:
template_one.html:
template_two.html:
s
I assume
today
is being passed into template_two as a variable?You can't use
{...}
for the id name, only the value, so what you want would look like:However, I don't think that is going to work, so you will need to do:
Perfect. Thank you!